LocalAddress and Ephemeral ports - how do I find out where Netty bound?

"Trustin Lee (이희승)" trustin at gmail.com
Mon Apr 12 06:30:24 EDT 2010


Hi Florian,

Are you using the local transport?  The local transport is not
compatible to the socket transport.  It uses completely different
address type - LocalAddress, and it does not accept InetSocketAddress.

There was a request about adding a variant of the local transport that
is compatible with the socket transport.  I might work on it in the next
major feature release:

    https://jira.jboss.org/jira/browse/NETTY-212

Please put a watch on it so that you are notified on resolution.
Perhaps you could even contribute! :)

Thanks,
Trustin

Florian Leibert wrote:
> I want to use an Ephemeral port for my Netty service. (useful b/c I want to
> run multiple services on one physical machine, unit tests etc.) Binding
> seems easy, just using a new LocalAddress(LocalAddress.EPHEMERAL) - what I
> found odd was that binding to a InetSocketAddress(0) doesn't seem to work
> (which usually will ask the OS for a available port. 
> 
> The question is, how do I obtain the port that Netty bound to using the
> LocalAddress mechanism? 
> 
> Thanks, 
> Florian

-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100412/b8848ecb/attachment.bin 


More information about the netty-users mailing list