# HG changeset patch # User kono # Date 1221110302 -32400 # Node ID 4a02c7f267943019da55a6f3e04e75e60b9cff78 # Parent 6c2f542654712f206368129af35631de08bea0f2 *** empty log message *** diff -r 6c2f54265471 -r 4a02c7f26794 rep/SessionManager.java --- a/rep/SessionManager.java Wed Sep 10 19:28:13 2008 +0900 +++ b/rep/SessionManager.java Thu Sep 11 14:18:22 2008 +0900 @@ -1,3 +1,4 @@ + package rep; import java.io.IOException; diff -r 6c2f54265471 -r 4a02c7f26794 rep/channel/REPSocketChannel.java --- a/rep/channel/REPSocketChannel.java Wed Sep 10 19:28:13 2008 +0900 +++ b/rep/channel/REPSocketChannel.java Thu Sep 11 14:18:22 2008 +0900 @@ -33,7 +33,6 @@ public static void addChannel(SelectableChannel sc,SelectableChannel rc) { channels.put(sc, rc); - //System.err.println("add Channel "+channels); } public void close1() throws IOException { @@ -92,32 +91,30 @@ @Override protected void implCloseChannel() throws IOException { - sc.close(); + close1(); } - public long read(ByteBuffer header) { - // TODO Auto-generated method stub - return 0; + public long read(ByteBuffer header) throws IOException { + return sc.read(header); } public void write(ByteBuffer buffer) throws IOException { - // TODO Auto-generated method stub + sc.write(buffer); } - public boolean finishConnect() { - // TODO Auto-generated method stub - return false; + public boolean finishConnect() throws IOException { + return sc.finishConnect(); } public Socket socket() { - // TODO Auto-generated method stub - return null; + return sc.socket(); } public P read() throws IOException{ return pack.unpackUConv(sc); } + public boolean write(P p){ ByteBuffer bb = pack.packUConv(p); if (bb==null) return true;