语法: 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:
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.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。