Closing & Stopping Port Connections

This is a discussion on Closing & Stopping Port Connections within the Windows Programming forums, part of the Platform Specific Boards category; Hi, Im making a small security program and im not to sure how i would break a connection a port. ...

  1. #1
    Registered User (TNT)'s Avatar
    Join Date
    Aug 2001
    Location
    UK
    Posts
    339

    Closing & Stopping Port Connections

    Hi,

    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?

    Thanks
    TNT
    TNT
    You Can Stop Me, But You Cant Stop Us All

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,856
    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, 03: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21