You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/modules/http.server.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## http.server
2
2
3
-
*http.server* objects are used to encapsulate the accept() and dispatch of http clients. Each client request triggers `onstream`which is called from an independent cqueue, providing an independent process for each request. `onstream`can also be used for testing and upgrading a request, with HTTP 1.1 to WebSockets being the notable example.
3
+
*http.server* objects are used to encapsulate the `accept()` and dispatch of http clients. Each new client request will invoke the `onstream`callback in a new cqueues managed corourine. In addition to constructing and returning a HTTP response, an `onstream`handler may upgrade a stream from from HTTP 1.1 to a WebSocket connection.
4
4
5
5
For examples of how to use the server library, please see the [examples directory](https://github.com/daurnimator/lua-http/tree/master/examples) in the source tree.
0 commit comments