I've noticed that if the client is abruptly disconneced that the server will crash when $client->send() is called. How can I be sure that the client is still valid before the $client->send() command is issued? Just checking that $client still exists isn't enough, it seems to exist long enough after a disconnect to cause problems.my($client, $client_addr) = $server->accept();
#only send if $client exists $client->send() if $client;
In reply to Client still valid? by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |