public static function onConnect($client_id)
{
// 向当前client_id发送数据
//Gateway::sendToClient($client_id, "Hello $client_id\r\n");
// 向所有人发送
//Gateway::sendToAll("$client_id login\r\n");
/**
* 设备首次连接时
*/
//绑定fd
$port = $_SERVER;
self::get_or_post_request(self::request_url().'/bind_worker_fd','POST',array('fd' => $client_id,'port' => $port));
}
描述过于精简,请参考提问规范 https://wenda.workerman.net/question/3372 修改