diff options
| author | ame <[email protected]> | 2026-06-08 22:43:05 -0500 |
|---|---|---|
| committer | ame <[email protected]> | 2026-06-08 22:43:05 -0500 |
| commit | 66aedfd65cff3494b70e8072646094479e3bfed8 (patch) | |
| tree | 0106935549143d542819da445e9a74740d617d94 /library | |
| parent | 4cbf47f295fc65e4a470d93194259d80c942b32b (diff) | |
net util
Diffstat (limited to 'library')
| -rw-r--r-- | library/lullaby/net.lua | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/library/lullaby/net.lua b/library/lullaby/net.lua index 826a9b2..e9bab4b 100644 --- a/library/lullaby/net.lua +++ b/library/lullaby/net.lua @@ -22,6 +22,12 @@ function res_table.send(T, value) end ---@return error | nil error function res_table.sendfile(T, value) end +---sends a status code to the client and closes socket +---@param T res-table +---@param code integer +---@return error | nil error +function res_table.error(T, code) end + ---sends value to client and doesn't close the socket ---@param T res-table ---@param value string @@ -53,6 +59,9 @@ res_table.ssl.cert = "" ---key value table containing header values to be sent res_table.header = {} +---@type boolean +res_table.open = true + ---@class req-table local req_table = {} @@ -74,7 +83,7 @@ req_table._bytes = 0 req_table.ip = 0 ---@type string -req_table.Body = "" +req_table.body = "" ---@type string req_table.path = "" |
