MY PROGRAM FLOW:
Enter loop Wait incoming data If (incoming data) { do something } elseif (no data && delay > 5 seconds) { send ping to server return to top of loop }
Of course, it's very simple. :-) But to make it work, I think I need to choose:
1. Timeout the socket_read() (nonblocking socket, etc.) or 2. Use socket_select.
Here's my question: I have only one socket active in this application at any time. Is it appropriate to use socket_select with just one socket connection? And if I stop deselect that socket, and the server sends data while the scirpt is doing something else, will the data be lost, or will it wait o be read again once the script can give its attention to that connection?
....rEne
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php