diff options
Diffstat (limited to 'docs/net')
| -rw-r--r-- | docs/net/listen.md | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/net/listen.md b/docs/net/listen.md index 39b0f95..420a609 100644 --- a/docs/net/listen.md +++ b/docs/net/listen.md @@ -118,6 +118,8 @@ res:send("<h1>hello world</h1>") functionaly identical to res:write and res:close
+sets res.open to false
+
#### res:close
res:close()
@@ -128,6 +130,8 @@ this will still run any selected functions! this is called automatically when there are no more function
+sets res.open to false
+
#### res:stop
res:stop()
@@ -174,6 +178,25 @@ options table res:sendfile("./html/index.html")
```
+sets res.open to false
+
+### res:error
+
+res:error(code)
+
+sends an error message to the client
+
+```lua
+res:error(404)
+
+-- HTTP/1.1 404 Not Found
+-- ...
+--
+-- not found
+```
+
+sets res.open to false
+
### res:upgrade
res:upgrade()
@@ -197,6 +220,10 @@ res:write** - sends data as an incomplete frame res:sendfile** - sends file to the client
res:close** - same function
+### res.open
+
+boolean determining if the connection has been closed via res:send or res:close
+
### req.parameters
a list of parematers for the current function
|
