|
I like it :o) But in my mind, localAddress is optional (useless ?) because the IoAcceptor is already bound and you want to use this bound local address.
You have to specify local address because you can bind multiple handlers to multiple local addresses.
You're perfectly right. So +1 for me.
Decided to resolve this issue in 0.8.
Added IoAcceptor.newSession(remoteAddress, localAddress) which returns IoSession.
Transport types other than connectionless ones throw UnsupportedOperation. I didn't extend IoAcceptor because it is much simpler this way. |
||||||||||||||||||||||||||||||||||||||||||||||||||
* Add ConnectionlessIoAcceptor which extends IoAcceptor
* Add ConnectionlessIoAcceptor.newSession(SocketAddress remoteAddress, SocketAddress localAddress)
Users will be able to create a session object by calling newSession so easily that they can call write() method.
WDYT?