Hi, everyone,
I want to write a server program. Several clients can
connect to it at the same time(using socket() ,SOCKET_STREAM
and SOCKET_DGRAM).
Now here is a problem. If some clients abort abmormally,
for example, by press
"^C" or killed by user, clients can not tell the server to
reclaim those sockets. In this circumstance, I want the
server know this and then close those sockets that do not
connect with the clients any more.
How can I know the status of the sockets such as "weather
they are connected or broken" ?
Thanks in advance.
Shen Hui
*********************************************************
* SHEN Hui *
* Institute of Software *
* Chinese Academy of Sciences *
* ( IS / CAS ) *
* Email: [EMAIL PROTECTED] *
*********************************************************