Skip to content

Commit ea68db8

Browse files
committed
doc/modules/http.server.md: Better introduction
1 parent 28656f3 commit ea68db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

doc/modules/http.server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## http.server
22

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.
44

55
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.
66

0 commit comments

Comments
 (0)