using konoha.io.*; using konoha.socket.*; void main(String[] args) { int port = 8888; String host = "localhost"; print "client program"; print "port number = " + port; print "conect to " + host + "..."; Socket sock = new Socket("localhost", port); InputStream in = sock.getInputStream(); OutputSteram out = sock.getOutputStream(); String cmd = "Math.sin(45)"; print cmd; out.writeMsgPack(cmd); out.flush(); while ( !in.isClosed() ) { String ret =in.readLine(); print ret; } out.close(); in.close(); }