Solved

Reading A 'Port'

Posted on 2000-03-22
2
197 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
Comment Utility
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
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now