I have written a socket server and it all works fine but I am now trying to add some error handling.
This is the situation.
Client connects and send data.
Server acknowledges.
If there are commands cued for the client these are sent.
Client acknowledges command has been sent.
Connection is closed.
What I am trying to do is set a timeout on the client acknowledging the command sent. The server listens for the response using the code
Code: Select all
$response = socket_recv($tsock, $buf,1024,0);
$respdata.=$buf;Many thanks
Scott