Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Reading A 'Port'

Posted on 2000-03-22
2
Medium Priority
?
241 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 28

Accepted Solution

by:
AzraSound earned 600 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

610 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