Functions
createServerHandler
createServerHandler(handler): (event) => Promise<void>
Creates a socket handler function which accepts a socket event and parses the incoming data as an HTTP request.
Parameters
| Parameter | Type | Description |
|---|---|---|
handler | ServerHandler | The HTTP handler function to invoke when an HTTP request is received |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
event | SocketEvent |
Returns
Promise<void>
Note
This is a low-level function which usually should not be used directly. See listen() instead.