Results 1 to 4 of 4

Thread: Programming for a Terminal Server

  1. #1

    Thread Starter
    Addicted Member csammis's Avatar
    Join Date
    Mar 2001
    Location
    /dev/null
    Posts
    226
    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!"

  2. #2
    Lively Member
    Join Date
    Feb 2001
    Posts
    78
    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.

  3. #3
    Addicted Member AmmerBow's Avatar
    Join Date
    Sep 2000
    Posts
    195
    I need this same exact info if anyone knows
    Amiga 500 was here.

  4. #4
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344
    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
  •  



Click Here to Expand Forum to Full Width