Thread: Query About Socket Programming

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    10

    Query About Socket Programming

    Is there an in built function in C Programming(LINUX Platform of course) which can check whether a Client is still connected to the Server or not in a Socket Program. I had a problem with a Server-Client Socket Program where once the Server doesn't authenticate a Client, the Server Program Terminates but the Client program is still running even after the connection is lost....

  2. #2
    Registered User
    Join Date
    Apr 2008
    Posts
    90
    Assuming a TCP socket, the client (or server) won't know the other side closed down until a recv(2) on the socket returns 0.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. C programming reading/writting query
    By daza166 in forum C Programming
    Replies: 6
    Last Post: 12-31-2010, 10:33 AM
  2. About Device Driver Programming And Socket Programming
    By pritesh in forum Linux Programming
    Replies: 6
    Last Post: 01-23-2010, 03:46 AM
  3. Handle query strings using socket programming
    By c00get in forum Networking/Device Communication
    Replies: 2
    Last Post: 12-15-2009, 01:56 PM
  4. Socket programming in C with socket.h
    By funzy in forum Networking/Device Communication
    Replies: 13
    Last Post: 08-29-2008, 04:12 AM
  5. Not strictly a C programming query!
    By VegasSte in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 10-08-2002, 09:52 AM

Tags for this Thread