workerman使用udp协议的话,客户端如何测试发送数据呢?
这是服务端:
```php
<?global $text_worker, $global_uid;
// 为这个链接分配一个uid
$connection->uid = ++$global_uid;
}
// 当客户端发送消息过来时,转发给所有人
function handle_message($connection, $data)
{
global $text_worker;
foreach($text_workerlogout");
}
}
// 创建一个文本协议的Worker监听2347接口
$text_worker = new Worker("udp://0.0.0.0:2348");
// 只启动1个进程,这样方便客户端之间传输数据
$text_worker->count = 1;
$text_worker->onConnect = 'handle_connection';
$text_worker-