From the docs (msdn) about TcpListener(IPEndpoint) constructor:
Remarks
This constructor allows you to specify the local IP address and port
number on which to listen for incoming connection attempts. Before using
this construcor, you must create an IPEndPoint using the desired local
IP address and port number. Pass this IPEndPoint to the constructor as
the localEP parameter.
If you do not care which local address is assigned, you can create an
IPEndPoint using IPAddress.Any as the address parameter, and the
underlying service provider will assign the most appropriate network
address. This might help simplify your application if you have multiple
network interfaces.
Does it help?
Sunny
In article <(E-Mail Removed)>,
(E-Mail Removed) says...
> I have a TCPListener which needs to listen on my LAN IP as well as the
> loopback address. In VS.Net 2002 the TCPListener constructor could
> accept the port as an argument and it automatically bound to all
> network adapters (this is also how it worked with VB6). Now that
> constructor is obsolete, and the new one requires an IPEndPoint or
> IPAddress.
>
> How could I listen on the same port on all network adapters using
> VS.Net 2003? I'd rather not use DNS.
>
> thanks,
> Keith
>