|
|
@@ -26,10 +26,7 @@ class Events
|
|
|
// GatewayWorker建议不做任何业务逻辑,onMessage留空即可
|
|
|
public static function onMessage($client_id, $message)
|
|
|
{
|
|
|
- Gateway::sendToClient($client_id,json_encode(array(
|
|
|
- 'type' => 'heart',
|
|
|
- 'client_id' => $client_id
|
|
|
- )));
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//当用户断开连接时触发
|