view echoServer/echoClient.k @ 0:536b29f11352

add some files
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Sat, 28 Apr 2012 21:01:53 +0900
parents
children
line wrap: on
line source

using konoha.socket.*;
using konoha.io.*;

void main(String[] args) 
{
	int port = 8888;
	String host = "localhost";
	print "port number = " + port;
	print "host = " + host;

	Socket sock = new Socket(host, port);

	InputStream in = sock.getInputStream();
	OutputStream out = sock.getOutputStream();

	out <<< "test" <<< EOL;
	out.flush();
	String b = in.readLine();
	print b;
	in.close();
	out.close();
	

}