Results 1 to 10 of 10

Thread: close a tcp connection?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    close a tcp connection?

    you know how u can get the tcp connections table... well, how would i close one of those connections?

  2. #2
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    The Dark Side of the Moon
    Posts
    448
    Does it have a method associated with it called .Close() ?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    Im tryin to close an "external" connection... I didn't make the connection, it was established through another program or whatever. You know how if you type the dos command... netstat -n ... and it shows you all of your tcp connections (tcp table).... well, how would i be able to close one of them?

    Im makin an anti-cheat program for a game, and when someone is caught cheating, or isnt running the anticheat program, I want it to terminate their connection to the host of the game...

    So I basically want to know how to close an external tcp/winsock connection...

  4. #4
    jim mcnamara
    Guest
    You would go crazy trying this in VB. There are C samples of messing with connection ports in the PsTools kit.

    It's a freebie from www.sysinternals.com. has the tool kit and source code, too.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    404 error ... but i found an example at vbip.com that uses the IP Helper API (iphlpapi.dll)... I'm going to be experimenting with this later. Hopefully this works out!

  6. #6
    Hyperactive Member
    Join Date
    Aug 2001
    Location
    The Dark Side of the Moon
    Posts
    448
    The best way to break a TCP/IP connection is to unplug your network cable or phone wire.

  7. #7
    Member
    Join Date
    Jun 2006
    Posts
    38

    Re: close a tcp connection?

    This is a task I need to accomplish as well. I will work on something and let you know

  8. #8
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: close a tcp connection?

    Being a 4.5 year old thread, I don't think they are still looking for it. No real point ressurecting this thread, is there

    If however you do find something that you find useful, you can post it in the codebank (which is at the bottom of all forums on the main page)


    Has someone helped you? Then you can Rate their helpful post.

  9. #9
    Member
    Join Date
    Jun 2006
    Posts
    38

    Re: close a tcp connection?

    Woopsies, and I just started a thread on it too. Haha. :-/ Forum newb.

  10. #10
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: close a tcp connection?

    Don't worry, no harm done Just something to keep in mind next time


    Has someone helped you? Then you can Rate their helpful post.

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