时间:2021-07-01 10:21:17 帮助过:292人阅读
实例代码:
use PHPSocketIO\SocketIO; // listen port 2021 for socket.io client$io = new SocketIO(2021);$io->on('connection', function($socket)use($io){ $socket->on('chat message', function($msg)use($io){ $io->emit('chat message', $msg); });});
项目主页:http://www.open-open.com/lib/view/home/1444828274810