changeset 66:4ef0f4f47240

JavaPathFinder—p‚̃eƒXƒgƒNƒ‰ƒX
author kent
date Thu, 08 Nov 2007 12:12:47 +0900
parents b1710c49c883
children 2e5bd7bffa4b
files src/pathfinder/TestNetwork.java
diffstat 1 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pathfinder/TestNetwork.java	Thu Nov 08 12:12:47 2007 +0900
@@ -0,0 +1,29 @@
+package pathfinder;
+
+public class TestNetwork {
+	NetworkSimulator<String> ns;
+	
+	ChannelSimulator<String>  client;
+	ChannelSimulator<String>  server;
+	
+	public static void main(String [] arg)  {
+		TestNetwork test = new TestNetwork();
+		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() {
+		
+	}
+}