RatchetPHP-客户端在从服务器接收消息之前与服务器断开连接

RatchetPHP-客户端在从服务器接收消息之前与服务器断开连接,php,websocket,composer-php,ratchet,reactphp,Php,Websocket,Composer Php,Ratchet,Reactphp,因此,我正在尝试棘轮教程(),我有一个问题: 每次对ConnectionInterface对象调用send()方法时,该客户端都会与服务器断开连接 示例如下: SSH终端 php server1.php New connection! (54) New connection! (83) Connection 83 sending message "test msg" to 1 other connection Connection 54 has disconnected 我甚至没有收到54号客

因此,我正在尝试棘轮教程(),我有一个问题: 每次对ConnectionInterface对象调用send()方法时,该客户端都会与服务器断开连接

示例如下:

SSH终端

php server1.php
New connection! (54)
New connection! (83)
Connection 83 sending message "test msg" to 1 other connection
Connection 54 has disconnected
我甚至没有收到54号客户端的“测试信息”

我的文件:

server1.php


我也有类似的错误

当我检查错误时,我注意到在客户端,当我收到消息时,我在接收方法中写了一些东西,这些东西会导致连接从客户端断开


此错误与服务器无关

我也有类似的错误

当我检查错误时,我注意到在客户端,当我收到消息时,我在接收方法中写了一些东西,这些东西会导致连接从客户端断开

此错误与服务器无关