[Nbserver-devel] NBServer for "client" side ...
Status: Beta
Brought to you by:
szegedia
From: Zombi <zo...@ma...> - 2002-02-22 00:30:52
|
Hi ! I wrote some code, which helps to use nbserver protocol abstraction, from the "client" side, when our program initiate the communication to a remote address. To use it,we just call : service.doConnect( SocketAddress address ) and (as i hope:-) the NioServer opens a SocketChannel to the address, register selectionkey to the NioServer.connectingSelectors, which delivers OP_CONNECT message back to Service.connected(SocketChannel) which finally call the ProtocolHandlerFactory.createProtocolHandler() method, and register the ProtocolHandler with the NioServer ... :-) I hope it's works, but i can't test it now ... :-( at least, i'm sure, i didn't brake any existing code :-) I include the 2 modified source (NioServer.java, Service.java) the new ConnectingSelectorLoop.java, and an output of a 'cvs-diff' command ... good bye Zsombor |