June 23, 2005
I pass InternetAddress.PORT_ANY to Socket.bind. How can I figure out on which port socket is listening.
-- 
Dawid Ciężarkiewicz | arael
June 23, 2005
On Thu, 23 Jun 2005 23:41:59 +0200, Dawid Ciężarkiewicz <arael@fov.pl> wrote:
> I pass InternetAddress.PORT_ANY to Socket.bind. How can I figure out on
> which port socket is listening.

Try the "localAddress()" method, it returns an Address (or rather an InternetAddress) which has a "port()" method.

Regan
Top | Discussion index | About this forum | D home