Solved

Reading A 'Port'

Posted on 2000-03-22
2
217 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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 …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

840 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