Link to home
Start Free TrialLog in
Avatar of ff_axel
ff_axel

asked on

Reading A 'Port'

I have an application that runs on NT Server (located on a network).  Users can connect to this multi-threaded application via a port number (e.g. 10020) defined in the services file using custom client tools running on NT Client. I would like to be able to monitor how many users had  'connections' at any given time.  
ASKER CERTIFIED SOLUTION
Avatar of AzraSound
AzraSound
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aminerd
aminerd

I'm assuming that you are using multiple winsock controls in your program. If that is the case you should be able to loop through the controls and check to see if someone is connected.

For i = 1 to WinsockControls.Count
  If WinsockControls(i).State = 7 Then 'Connected
    UserCount = UserCount + 1
  End If
Next