Le 5/23/12 11:13 AM, Julien Vermillard a écrit :
Hi,
Actually you can bind a TcpServer (NioAcceptorService in 2.X I think)
multiple times on multiple addresses, which create ServerSocketChannel
for each bind. You can unbind each address individually.
I think it make the API and the code complex for a non really frequent use case.
I propose one TcpServer bound on one address, if you want to bind
multiple address you instantiate a TcpServer per address and you share
the SelectorProcessor between the TcpServer instance.
WDYT ?
Totally +1. There are few use cases where you want to bind more than one
address on a TcpServer (Firewall, Proxy), so better handling this at
this level than in the TcpServer itself.
--
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com