Re: Check client socket is alive or not

Discussion in 'C Programming' started by Michel Bardiaux, Jul 23, 2003.

  1. John shu wrote:
    > In client-server archittecture in c,I need a help how to check if the
    > client socket is alive or not.
    >
    > 1.Established a connection between server & client.
    > 2.Before message write in to the client socket , check if the client
    > socket is alive or not.
    >
    >
    > Broken pipe error occur in my implementation


    You have to configure your signals set to ignore SIGPIPE. Then you dont
    need to check, the write() will return error but the process will not be
    terminated.

    > 1.Establish a connection between server & client.
    > 2.Disconnect Client from the server.
    > 3.I write a message to the client socket with out any check.



    --
    Michel Bardiaux
    Peaktime Belgium S.A. Bd. du Souverain, 191 B-1160 Bruxelles
    Tel : +32 2 790.29.41
    Michel Bardiaux, Jul 23, 2003
    #1
    1. Advertising

  2. Michel Bardiaux

    Default User Guest

    Michel Bardiaux wrote:

    > You have to configure your signals set to ignore SIGPIPE. Then you dont
    > need to check, the write() will return error but the process will not be
    > terminated.



    How can we get you configured to stop posting off-topic stuff in this
    newsgroup?




    Brian Rodenborn
    Default User, Jul 23, 2003
    #2
    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. Michael Ulmann

    Check if session with know id is still alive...

    Michael Ulmann, Oct 4, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    587
    John Saunders
    Oct 4, 2004
  2. check socket alive

    , Feb 8, 2005, in forum: Python
    Replies:
    1
    Views:
    4,648
    Steve Horsley
    Feb 9, 2005
  3. Replies:
    15
    Views:
    3,970
  4. Iñaki Baz Castillo
    Replies:
    12
    Views:
    193
    Eric Hodel
    Feb 9, 2011
  5. hisan
    Replies:
    1
    Views:
    1,303
    Dan Stromberg
    Jun 25, 2012
Loading...

Share This Page