|
-
May 22nd, 2001, 04:52 PM
#1
Thread Starter
Addicted Member
I can help with the "number of current connections" problem...if anyone can help with the second part, I'd appreciate it too 
Anyway, here's what you do: Have a global variable called currentConnections or whatever you want. In the code where your server accepts connections, increment that variable by one. Now, you should subtract it by one in *two* places: where the user terminates the connection with a command (i.e., user says "quit" or whatever they use to disconnect) and in the [socket]_Close event. The second one is if the client disconnects without issuing a "quit" command.
Hope this helps!
Things I've Said:
"Life's funny like that...elephants can wear frilly lace panties, and Dubya still looks like a monkey in a big chair"
"Take four goats and strap one to each foot of a llama. Presto, goat-powered llama!"
"You want to get me to work more, get me a Coke. No? Then deal with inferior garbage, I'm not coding another line and your clients can go to......thanks, I'd love a Coke right about now!"
-
May 22nd, 2001, 05:14 PM
#2
Lively Member
Well thats one way to go. The way I was thinking off is grabbing all that info from the terminal server manager itself. I was playing around with the command prompt and figured out how to get it to spit out some stuff.
what i am thinking about doing is running a command from a command prompt:
c:\>query session /Server:MyServer > textfile.txt
This will spit out some info about the current connections into a text file. Then I could open the file in VB, do some tricky searching and then I would know how many connections there are. But I want to know more.... So i have to keep looking. I did find some stuff at www.planet-source-code.com but i couldn't get it to work.
What I need to do is query the server for the number of connection, and then where each connection comes from (machine name, and username).
Gotta keep looking.
-
Feb 7th, 2002, 05:09 PM
#3
Addicted Member
I need this same exact info if anyone knows
-
Feb 7th, 2002, 07:21 PM
#4
Originally posted by AmmerBow
I need this same exact info if anyone knows
Just ask those guys again.
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|