Solved

Reading A 'Port'

Posted on 2000-03-22
2
223 Views
Last Modified: 2013-11-13
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.  
0
Comment
Question by:ff_axel
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 200 total points
ID: 2647875
check out this small project at:
http://www.vb-helper.com/Howto/netconn1.zip
It uses a RAS Api call to determine the number of connections
0
 
LVL 5

Expert Comment

by:aminerd
ID: 2656472
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
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If you haven’t already, I encourage you to read the first article (http://www.experts-exchange.com/articles/18680/An-Introduction-to-R-Programming-and-R-Studio.html) in my series to gain a basic foundation of R and R Studio.  You will also find the …
Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question