Checking Socket State

This is a discussion on Checking Socket State within the Networking/Device Communication forums, part of the General Programming Boards category; Is there a function which returns the state of a socket, kind of like when you do a 'netstat -a'?...

  1. #1
    C++ Developer XSquared's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    2,718

    Checking Socket State

    Is there a function which returns the state of a socket, kind of like when you do a 'netstat -a'?
    Naturally I didn't feel inspired enough to read all the links for you, since I already slaved away for long hours under a blistering sun pressing the search button after typing four whole words! - Quzah

    You. Fetch me my copy of the Wall Street Journal. You two, fight to the death - Stewie

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    Knock yourself out.

    Alternatively, try popen().
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    On the Win32 platform, one solution is select().

    Kuphryn

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Socket State (connected or not)
    By Cpp_Noob in forum Networking/Device Communication
    Replies: 2
    Last Post: 07-05-2009, 04:17 AM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. input/switch statement issues
    By peanut in forum C Programming
    Replies: 5
    Last Post: 10-27-2006, 02:58 PM
  4. NAQ: Everything you never wanted to know about CPP
    By evildave in forum C Programming
    Replies: 21
    Last Post: 12-12-2005, 09:56 AM
  5. Problems about gcc installation
    By kevin_cat in forum Linux Programming
    Replies: 4
    Last Post: 08-09-2005, 09:05 AM

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