Know if the client has terminated while using sockets in C..
Posted
by shadyabhi
on Stack Overflow
See other posts from Stack Overflow
or by shadyabhi
Published on 2010-04-07T14:25:44Z
Indexed on
2010/04/07
14:33 UTC
Read the original article
Hit count: 323
Suppose, I have a connected socket after writing this code..
if ((sd = accept(socket_d, (struct sockaddr *)&client_addr, &alen)) < 0)
{
perror("accept failed\n");
exit(1);
}
How can I know at the server side that client has exited.
© Stack Overflow or respective owner