From 340f17a474401563de89aa0444f7cdee209b9c35 Mon Sep 17 00:00:00 2001 From: ame Date: Mon, 5 Feb 2024 16:03:56 -0600 Subject: cleaning and fixes --- docs/net.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'docs/net.md') diff --git a/docs/net.md b/docs/net.md index b129aa1..cfc064e 100644 --- a/docs/net.md +++ b/docs/net.md @@ -31,7 +31,7 @@ server:unlock() ... ``` -### server:close ** +### server:close closes server @@ -43,11 +43,9 @@ the function has 2 arguments, the first (res) contains functions and info about the second (req) contains info on the request, the path allows for wildcards, multiple get requests per path is allowed ```lua - - server:GET("*", function(res, req, next) if(req['Version'] ~= "HTTP/1.1") then - res:deny() + res:close() end end) @@ -59,16 +57,6 @@ end) ... ``` -#### res:deny ** - -denies request as if there was no server - -```lua -... -res:deny() --make the client timeout, lol -... -``` - #### res:write 'takes a string @@ -95,7 +83,7 @@ res:send("

hello world

") ... ``` -#### res:end +#### res:close closes connection, sets res.client_fd to -1, any calls that use this value will fail -- cgit v1.2.3