Exiting socket gracefully

Discussion in 'C Programming' started by vkaushal21, Sep 7, 2009.

  1. vkaushal21

    vkaushal21

    Joined:
    Sep 7, 2009
    Messages:
    1
    Likes Received:
    0
    I am writing a socket ...

    When I call accept function, it keeps on waiting for the new connection.

    I want to know, can I call accept function in some manner so that it doesn't completely hang the execution. I don't want to use Ctrl+C to exit the server everytime.

    I know threading is an option, but some other better option?
     
    vkaushal21, Sep 7, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William F. Robertson, Jr.

    gracefully handling stored procedure errors

    William F. Robertson, Jr., Oct 24, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    543
    William F. Robertson, Jr.
    Oct 28, 2003
  2. - Steve -

    Gracefully Handling Logged Out User

    - Steve -, Jun 22, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    544
    - Steve -
    Jun 23, 2004
  3. =?Utf-8?B?TWFyaw==?=

    Handle HttpRequestValidationException gracefully

    =?Utf-8?B?TWFyaw==?=, Mar 21, 2005, in forum: ASP .Net
    Replies:
    6
    Views:
    3,073
    =?Utf-8?B?TWFyaw==?=
    Mar 21, 2005
  4. =?Utf-8?B?cm9kY2hhcg==?=

    gracefully move from details page

    =?Utf-8?B?cm9kY2hhcg==?=, Jun 2, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    545
    =?Utf-8?B?cm9kY2hhcg==?=
    Jun 6, 2005
  5. Magnus Lycka
    Replies:
    3
    Views:
    1,898
    Magnus Lycka
    May 31, 2005
  6. Laszlo Nagy
    Replies:
    1
    Views:
    6,901
    Mark Wooding
    Jan 27, 2009
  7. Steve Holden
    Replies:
    1
    Views:
    962
  8. Pete Emerson
    Replies:
    1
    Views:
    516
    Gabriel Genellina
    Mar 17, 2010
Loading...