...
|
...
|
@@ -131,10 +131,11 @@ $tcp_worker->count = 1; |
|
|
|
|
|
|
|
|
$tcp_worker->uidConnections = array();
|
|
|
|
|
|
// 当客户端发来数据时
|
|
|
$tcp_worker->onMessage = function($connection, $data) {
|
|
|
global $tcp_worker;
|
|
|
var_dump($connection->uid);
|
|
|
var_dump($tcp_worker->connections);
|
|
|
// 判断当前客户端是否已经验证,即是否设置了uid
|
|
|
if(!isset($connection->uid))
|
|
|
{
|
...
|
...
|
|