diff options
author | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-05-09 09:58:58 -0700 |
---|---|---|
committer | Michael Martin <3277009+flrgh@users.noreply.github.com> | 2022-05-09 09:59:13 -0700 |
commit | 3c69b6ae9aa021d94a62db18b6447e64487bebce (patch) | |
tree | bf0196255515916d5a983c7d479591ed59f145d0 /meta | |
parent | bc3842cf5dbd60b1f5800adb31f59133e12d1f8b (diff) | |
download | lua-language-server-3c69b6ae9aa021d94a62db18b6447e64487bebce.zip |
add tcp/udp overload annotations for unix sockets
Diffstat (limited to 'meta')
-rw-r--r-- | meta/3rd/OpenResty/library/ngx.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/meta/3rd/OpenResty/library/ngx.lua b/meta/3rd/OpenResty/library/ngx.lua index d3cf8c6b..a607545a 100644 --- a/meta/3rd/OpenResty/library/ngx.lua +++ b/meta/3rd/OpenResty/library/ngx.lua @@ -2697,9 +2697,10 @@ local udpsock = {} --- Calling this method on an already connected socket object will cause the original connection to be closed first. --- ---@param host string ----@param port? number +---@param port number ---@return boolean ok ---@return string? error +---@overload fun(self:udpsock, unix_socket:string):boolean, string? function udpsock:setpeername(host, port) end --- Sends data on the current UDP or datagram unix domain socket object. @@ -2857,10 +2858,11 @@ local tcpsock = {} --- Calling this method on an already connected socket object will cause the original connection to be closed first. --- ---@param host string ----@param port? number +---@param port number ---@param opts? tcpsock.connect.opts ---@return boolean ok ---@return string? error +---@overload fun(self:tcpsock, unix_socket:string, opts?:tcpsock.connect.opts):boolean, string? function tcpsock:connect(host, port, opts) end --- An optional Lua table can be specified as the last argument to `tcpsock:connect()` |