socket_create和stream_socket_server创建出来的socket有啥区别?有和优劣? workerman为什么选择stream_socket_server?...
我写的例子总是会触发connect方法,一旦telnet建立了连接,会不停输出1111111。如何才能保证每次建立连接,事件只触发一次呢? <?php $base = event_base_new(); $event = event_new(); // 创建socket $serv_socket = stream_socket_server('tcp://0.0.0.0:8000',$errno,$errst...
在workerman中用self::log(getmypid())做了下日志,启动的时候会生成8个子进程。 2016-11-09 17:42:06 pid:32878 Workerman start in DEBUG mode 2016-11-09 17:42:06 pid:32879 启动子进程32879 2016-11-09 17:42:06 pid:32880 启动子进程32880 2016-11-09 17:...
// Is still running state then fork a new worker process. // 监控子进程恶意退出后,自动重启子进程的么? if (self::$_status !== self::STATUS_SHUTDOWN) { self::forkWorkers(); // If reloading continue. if (isset(self::$_pi...