Mercurial > hg > RemoteEditor > REPSessionManager
changeset 217:4deaaaa6354e
*** empty log message ***
author | kono |
---|---|
date | Sun, 31 Aug 2008 00:26:35 +0900 |
parents | f92a3ffaf31f |
children | 827c439d0da4 |
files | rep/channel/REPSelectionKey.java |
diffstat | 1 files changed, 12 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/REPSelectionKey.java Sun Aug 31 00:07:21 2008 +0900 +++ b/rep/channel/REPSelectionKey.java Sun Aug 31 00:26:35 2008 +0900 @@ -23,9 +23,18 @@ @Override public SelectableChannel channel() { - assert(false); - // use public SelectableChannel channel(REPPack<P>packer) instead - return key.channel(); + if (REPServerSocketChannel.isSimulation) return key.channel(); + if (key.isAcceptable()) { + SelectableChannel sc = key.channel(); + SelectableChannel rsc = REPSocketChannel.channels.get(sc); + return rsc; + } else if (key.isReadable()) { + SelectableChannel sc = key.channel(); + SelectableChannel rsc = REPSocketChannel.channels.get(sc); + return rsc; + } + return null; + } public SelectableChannel channel(REPPack<P>packer) {