Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sendMessage($clients, $socket, $buffer)
- {
- foreach ($clients as $client)
- {
- $message = $socket . " >> " . $buffer;
- try
- {
- socket_write($client, $message);
- }
- catch(Exception $e)
- {
- //remove $client from $clients;
- }
- }
- }
Add Comment
Please, Sign In to add comment