这段代码,启动 php run.php start,正常
require_once __DIR__ . '/vendor/autoload.php';
use Workerman\Worker;
use Workerman\Lib\Timer;
$tcp_worker = new Worker('frame://0.0.0.0:1223');
$tcp_worker->onConnect = function ($connection){
echo "connection success\n";
};
$tcp_worker->onWorkerStart = function($tw){
};
$tcp_worker->onMessage = function($connection, $data){
var_dump($data);
$connection->send($data);
};
Worker::runAll();
但是telnet 127.0.0.1 1223
然后输入
就会报错
telnet 自动退出
请问大家遇到这样的问题了吗?
有什么解决方法吗?
frame协议是二进制的,不支持telnet