Mercurial > hg > RemoteEditor > REPSessionManager
diff test/channeltest/testSeMa.java @ 175:5653cf8e3c8b
*** empty log message ***
author | kent |
---|---|
date | Thu, 28 Aug 2008 21:22:07 +0900 |
parents | 72252e970a8b |
children | f34608ae1ed2 |
line wrap: on
line diff
--- a/test/channeltest/testSeMa.java Thu Aug 28 19:49:41 2008 +0900 +++ b/test/channeltest/testSeMa.java Thu Aug 28 21:22:07 2008 +0900 @@ -39,10 +39,14 @@ scs.socket().setReuseAddress(true); scs.socket().bind(IP); scs.configureBlocking(false); - selector.register(scs, SelectionKey.OP_ACCEPT, null); + //selector.register(scs, SelectionKey.OP_ACCEPT, null); + scs.register(selector, SelectionKey.OP_ACCEPT, null); } catch (IOException e1) { + ns.writeLog("cannot create REPServerSocketChannel!, exit."); return; } + ns.writeLog("selector is "+selector.toString()); + ns.writeLog("REPssc is "+scs.toString()); ns.writeLog("SessionManager starts mainroutin.", 1); @@ -59,7 +63,8 @@ REPServerSocketChannel<String> sc = (REPServerSocketChannel<String>) key.channel(); REPSocketChannel<String> channel; channel = sc.accept1(); - selector.register(channel, SelectionKey.OP_READ, null); + //selector.register(channel, SelectionKey.OP_READ, null); + channel.register(selector, SelectionKey.OP_READ, null); ns.writeLog("accepts a client.", 1); }else if(key.isReadable()){