view src/pathfinder/Test.java @ 67:2e5bd7bffa4b

JavaPathFinder—p‚̃eƒXƒgƒNƒ‰ƒX
author kent
date Thu, 08 Nov 2007 12:21:25 +0900
parents
children 735e70091564
line wrap: on
line source

package pathfinder;

public class Test {
	NetworkSimulator<String> ns;
	
	ChannelSimulator<String>  client;
	ChannelSimulator<String>  server;
	
	public static void main(String [] arg)  {
		Test test = new Test();
		test.test();
	}
	
	void test() {
		ns = new NetworkSimulator<String>();
		client = new ChannelSimulator<String>(ns);
		ns.connect(client);
		server = ns.accept();
		
		client.write("client write some thing");
		
		System.out.println(server.read());
		
	}
	
	void thread() {
		
	}
}