试了下按照swoole创建tcp,但是遇到了一些问题。不是很懂linux,特来请教。
这里意思是我已经开启了 r.php进程的意思吗?
这是端口使用情况
我输入了hello并没有任何反应这是为什么呢?
参考资料:https://wiki.swoole.com/wiki/...
r.php的内容为
$http = new swoole_http_server("127.0.0.1", 9501);
$http->on("start", function ($server) {
echo "Swoole http server is started at http://127.0.0.1:9501\n";
});
$http->on("request", function ($request, $response) {
$response->header("Content-Type", "text/plain");
$response->end("Hello World\n");
});
$http->start();
上面写的很清楚 端口被占用,kill掉之后再运行