Mercurial > hg > RemoteEditor > REPSessionManager
changeset 172:a776ec9ed848
*** empty log message ***
author | kono |
---|---|
date | Thu, 28 Aug 2008 18:57:17 +0900 |
parents | 690182302c05 |
children | 48c64244d4d4 |
files | rep/SMConnector.java rep/net/REPNet.java test/channeltest/testNetworkSimulator.java |
diffstat | 3 files changed, 5 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/SMConnector.java Thu Aug 28 18:56:59 2008 +0900 +++ b/rep/SMConnector.java Thu Aug 28 18:57:17 2008 +0900 @@ -14,7 +14,7 @@ //int port = Integer.parseInt(args[2]); InetSocketAddress addr = new InetSocketAddress(host, port); try { - sessionchannel = REPSocketChannel.open(); + sessionchannel = REPSocketChannel.<REPCommand>create(); sessionchannel.configureBlocking(true); sessionchannel.connect(addr); System.out.println("connect");
--- a/rep/net/REPNet.java Thu Aug 28 18:56:59 2008 +0900 +++ b/rep/net/REPNet.java Thu Aug 28 18:57:17 2008 +0900 @@ -2,8 +2,6 @@ import java.io.IOException; import java.net.InetSocketAddress; -import java.nio.channels.SocketChannel; - import rep.REPCommand; import rep.REPPacketReceive; import rep.REPPacketSend; @@ -19,7 +17,7 @@ //String host = "localhost"; InetSocketAddress addr = new InetSocketAddress(host, port); try { - sc = REPSocketChannel.open(); + sc = REPSocketChannel.<REPCommand>create(); sc.configureBlocking(true); sc.connect(addr); while(!sc.finishConnect()){
--- a/test/channeltest/testNetworkSimulator.java Thu Aug 28 18:56:59 2008 +0900 +++ b/test/channeltest/testNetworkSimulator.java Thu Aug 28 18:57:17 2008 +0900 @@ -15,9 +15,9 @@ static public REPLogger ns = new REPLogger(); public static void main(String[] args){ - REPServerSocketChannel.isSimulation = true; - testNetworkSimulator testns = new testNetworkSimulator(1, 0, 2); - + REPServerSocketChannel.isSimulation = false; + //testNetworkSimulator testns = new testNetworkSimulator(3, 10, 50); + testNetworkSimulator testns = new testNetworkSimulator(1, 1, 1); testns.startTest(); }