TCPIP Client/Listener for undetermined server address

  • Thread starter Thread starter Bob Harrison
  • Start date Start date
B

Bob Harrison

I will be distributing an application that works with our
security panel. The application can be loaded on several
workstations in a network but only one workstation
actually communicates via serial port or tcpip with the
security panel. I modified the client chat sample that
you have in your .net tcpip samples so that I can send
info back and forth between the main (polling)
workstation and any other workstations. The info is not
keyed by users but emanates from communication with the
panel.

The problem I found is this; the sample works if you know
the tcpip address or workstation name of the server as it
is used in the following line of code

client = New TcpClient("PE300", PORT_NUM)

In this case PE300 is the workstation name of the server
side.

Is there a way to dynamically find out the names or tcpip
addresses of workstations listening on a known port
number. This is needed because I have no way to know the
names or tcpip addresses of our clients' computers on the
network. Thanks.
 
You could have a function in the server that would poll
or do a port scan on the port required. Collect a list of
workstations from the active directory and run the
function.
 
The problem is not on the server side but the client
side. The client workstations must know the wktsn server
address or name.
 
Back
Top