tp上的代码: public function index() { $task_connection = new AsyncTcpConnection('websocket://127.0.0.1:9502'); // 发送数据 $task_connection->onConnect = function($task_connection) ...