diff options
| author | ame <[email protected]> | 2024-02-05 16:03:56 -0600 |
|---|---|---|
| committer | ame <[email protected]> | 2024-02-05 16:03:56 -0600 |
| commit | 340f17a474401563de89aa0444f7cdee209b9c35 (patch) | |
| tree | e4bb24263fade94cbeeaaa81a6ef5e0d352cb461 /docs/net.md | |
| parent | 056b24c2601c9ac932134c69cb1559905fa2d18b (diff) | |
cleaning and fixes
Diffstat (limited to 'docs/net.md')
| -rw-r--r-- | docs/net.md | 18 |
1 files changed, 3 insertions, 15 deletions
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("<h1>hello world</h1>") ...
```
-#### res:end
+#### res:close
closes connection, sets res.client_fd to -1, any calls that use this value will fail
|
