LocalAddress and Ephemeral ports - how do I find out where Netty bound?
"Trustin Lee (이희승)"
trustin at gmail.com
Mon Apr 12 06:39:46 EDT 2010
I forgot to mention that the ephmeral port in LocalAddress does not have
any specific port number. It's just a boolean flag.
Trustin Lee (이희승) wrote:
> 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/b1ab2d2a/attachment-0001.bin
More information about the netty-users
mailing list