摘要:
swoole单socket多读多写实现思路 方式一 利用通道的阻塞效果达成同一时刻只有一个协程能够访问到socket效果 # 伪代码 use Swoole\Coroutine; use Swoole\Coroutine\Channel; use function Swoole\Coroutine\r 阅读全文
摘要:
使用streamwrapper进行自定义解包封包 streamWrapper class stream wrapper和filter的关系:stream wrapper能够使resource流化,比如http://www.baidu.com/index.php,php内置的http stream w 阅读全文