I created my own SocketAcceptor class based on the default one that can handle binding to an undefined port number (either via null inet address or a port of 0). It's almost exactly the same except for providing a callback mechanism for notification of the port chosen. I would prefer returning a future from the bind() method that provides access to the chosen address, but since I'm not able to mess w/ the method signature, I chose a callback instead. I would also have rather extended the current SocketAcceptor to add this feature, but so much of the impl was private that i really couldn't re-use it.
I'd love to work w/ someone to get this back into Mina. Let me know if there is any interest. -pgm On 6/14/06, Pete McKinstry <[EMAIL PROTECTED]> wrote:
Is there a reason that the SocketAcceptor class does not allow null or port=0 InetAddresses? I have a scenario where I'd like to bind to any available local port, but it appears to be specifically disallowed. Not sure why... ? Thanks for the help. -pgm -- Pete McKinstry c: (206) 948.8098 h: (425) 746.2596
-- Pete McKinstry c: (206) 948.8098 h: (425) 746.2596
