Query About Socket Programming

This is a discussion on Query About Socket Programming within the C Programming forums, part of the General Programming Boards category; Is there an in built function in C Programming(LINUX Platform of course) which can check whether a Client is still ...

  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, 05: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, 10:52 AM

Tags for this Thread


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