1 Star 0 Fork 0

kuoyihp/nginx-lua-module-zh-wiki

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
udpsockclose.md 1.30 KB
一键复制 编辑 原始数据 按行查看 历史

udpsock:close

语法: ok, err = udpsock:close()

环境: rewrite_by_lua, access_by_lua*, content_by_lua*, ngx.timer.**

关闭当前 UDP 或 unix 域数据报 socket 。成功情况返回 1 ,反之错误情况返回 nil 和 错误描述信息。 Closes the current UDP or datagram unix domain socket. It returns the 1 in case of success and returns nil with a string describing the error otherwise.

当 socket 对象被 Lua GC(垃圾回收)释放或当前客户端请求处理完毕,还没有调用该方法的 socket 对象(关联连接)都将被关闭。

该特性是在 v0.5.7 版本首次引入的。

返回目录

English source:

udpsock:close

syntax: ok, err = udpsock:close()

context: rewrite_by_lua, access_by_lua*, content_by_lua*, ngx.timer.**

Closes the current UDP or datagram unix domain socket. It returns the 1 in case of success and returns nil with a string describing the error otherwise.

Socket objects that have not invoked this method (and associated connections) will be closed when the socket object is released by the Lua GC (Garbage Collector) or the current client HTTP request finishes processing.

This feature was first introduced in the v0.5.7 release.

Back to TOC

Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qizhendong_admin/nginx-lua-module-zh-wiki.git
git@gitee.com:qizhendong_admin/nginx-lua-module-zh-wiki.git
qizhendong_admin
nginx-lua-module-zh-wiki
nginx-lua-module-zh-wiki
master

搜索帮助