异步这种直接用webman自定义进程处理。 新建 process/Api.php <?php namespace process; use Workerman\Protocols\Http\Request; use Workerman\Connection\AsyncTcpConnection; class Api { public function onMessage($connection, R...
我用webman做了一个接口函数,接口函数会等待ws服务器的数据,根据解析的服务数据在返回数据,请问接口函数怎么做等待处理...
<?php namespace app\controller; use support\Request; use Workerman\Connection\AsyncTcpConnection; class Cabinet { // public function __construct() { global $con; global $cmd...
自定义进程 class Pusher { public function onWorkerStart() { //$GLOBALS['con']; global $con; $con = new AsyncTcpConnection('tcp://127.0.0.1:8282'); $con->onConnect = function(Asy...