企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
# swoole_server->close 关闭客户端连接,函数原型: ```php bool swoole_server->close(int $fd, bool $reset = false); ``` > swoole-1.8.0或更高版本可以使用$reset方法 * 操作成功返回true,失败返回false. * Server主动close连接,也一样会触发onClose事件。 * 不要在close之后写清理逻辑。应当放置到onClose回调中处理 * $reset设置为true会强制关闭连接,丢弃发送队列中的数据