“慢生活”不是懒惰,放慢速度不是拖延时间,而是让我们在生活中寻找到平衡。网站首页程序人生
workerman类TcpConnection的接口destroy
发布时间:2021-12-03 23:39:08作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
destroy说明:void Connection::destroy()立刻关闭连接。 与close不同之处是,调用destroy后即使该连接的发送缓冲区还有数据未发送到对端,连接也会立刻被关闭,并立刻触发该连接
阅读全文>>workerman类TcpConnection的接口getRemoteIp获取远端对端ip
发布时间:2021-12-03 23:38:26作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
getRemoteIp说明:string Connection::getRemoteIp()获得该连接的客户端ip 参数无参数 实例:<?phpuse Workerman\Worker;use Workerman\Connection\TcpConnection;require_o
阅读全文>>workerman类TcpConnection的接口getRemotePort获取远端对端端口
发布时间:2021-12-03 23:37:34作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
getRemotePort说明:int Connection::getRemotePort()获得该连接的客户端端口 参数无参数 实例:<?phpuse Workerman\Worker;use Workerman\Connection\TcpConnection;requi
阅读全文>>workerman类TcpConnection的接口close
发布时间:2021-12-03 23:37:08作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
close说明:void Connection::close(mixed $data = '')安全的关闭连接. 调用close会等待发送缓冲区的数据发送完毕后才关闭连接,并触发连接的onClose回调。 参数$data 可选参
阅读全文>>workerman类TcpConnection的maxSendBufferSize属性(缓冲区过载的影响因素)
发布时间:2021-12-03 21:55:50作者:雪饮
![[!--pagekey--]](/e/data/images/notimg.gif)
maxSendBufferSize说明:int Connection::$maxSendBufferSize每个连接都有一个单独的应用层发送缓冲区,如果客户端接收速度小于服务端发送速度,数据会在应用层缓冲区暂存等待
阅读全文>>