T
tommaso.gastaldi
Hi friend,
I am playing with Listeners. When one define a new TcpListener and
starts listening it may happen that there is some other program using
that channel.
For instance, on my pc DB2 is using port 50000.
Const Port As Integer = 50000
Dim LocalIP As System.Net.IPAddress = IPAddress.Parse("127.0.0.1")
Dim TcpListener As New TcpListener(LocalIP, Port)
TcpListener.Start() 'would rise exception
Does anybody have any hint on how can I get the information (at least
the name) of a process that is already using a port for its own
purposes? I would like to be able to inform the User that a port is
being used and, especially, by who.
Thanks,
-Tom
I am playing with Listeners. When one define a new TcpListener and
starts listening it may happen that there is some other program using
that channel.
For instance, on my pc DB2 is using port 50000.
Const Port As Integer = 50000
Dim LocalIP As System.Net.IPAddress = IPAddress.Parse("127.0.0.1")
Dim TcpListener As New TcpListener(LocalIP, Port)
TcpListener.Start() 'would rise exception
Does anybody have any hint on how can I get the information (at least
the name) of a process that is already using a port for its own
purposes? I would like to be able to inform the User that a port is
being used and, especially, by who.
Thanks,
-Tom