Thread: Closing & Stopping Port Connections

  1. #1
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001

    Closing & Stopping Port Connections


    Im making a small security program and im not to sure how i would break a connection a port. Say there was an established connection on port 60, how could i close that connection.

    And i assume to stop connections on a certain port i would just listen then do nothing when a connection is recived. Am i correct?

    You Can Stop Me, But You Cant Stop Us All

  2. #2
    train spotter
    Join Date
    Aug 2001
    near a computer
    I would just process the WM_SOCKET_NOTIFY msg's and call a close on any socket/port that is not needed (assuming you know what ones are going to be connected).

    Or open a socket on these ports and close as soon as a connect msg (FD_CONNECT) is received.

    If you want to keep the socket open just flush the incomming buffer as soon as you get the read.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Closing a serial port
    By Eirik in forum Windows Programming
    Replies: 8
    Last Post: 02-13-2009, 04:11 PM
  2. FTP program
    By jakemott in forum Linux Programming
    Replies: 14
    Last Post: 10-06-2008, 01:58 PM
  3. Count established connections
    By TomChesley in forum Networking/Device Communication
    Replies: 1
    Last Post: 05-27-2008, 08:32 PM
  4. multiplexing
    By kaijuu in forum C Programming
    Replies: 0
    Last Post: 03-29-2008, 06:47 AM
  5. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM