Mercurial > hg > RemoteEditor > REPSessionManager
changeset 266:4a02c7f26794
*** empty log message ***
author | kono |
---|---|
date | Thu, 11 Sep 2008 14:18:22 +0900 |
parents | 6c2f54265471 |
children | c513cf1ce9cc |
files | rep/SessionManager.java rep/channel/REPSocketChannel.java |
diffstat | 2 files changed, 9 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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;
--- 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;