Exiting socket gracefully

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

  1. vkaushal21

    vkaushal21

    Joined:
    Sep 7, 2009
    Messages:
    1
    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. Advertising

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. Magnus Lycka
    Replies:
    3
    Views:
    1,503
    Magnus Lycka
    May 31, 2005
  2. Laszlo Nagy
    Replies:
    1
    Views:
    4,761
    Mark Wooding
    Jan 27, 2009
  3. Jean-Paul Calderone
    Replies:
    0
    Views:
    944
    Jean-Paul Calderone
    Jan 27, 2009
  4. Laszlo Nagy
    Replies:
    0
    Views:
    526
    Laszlo Nagy
    Feb 1, 2009
  5. Pete Emerson
    Replies:
    1
    Views:
    419
    Gabriel Genellina
    Mar 17, 2010
Loading...

Share This Page