Std.Http.Server
14 public declarations
- Configuring
A server with one decision changed, each answering the server rather than
- handlerOf
&Std.Http.Server.Server -> fn(Std.Http.Server.Route.Request) -> Std.Http.ResponseThe handler a server presents, with every step wrapped around it.
- listenAndServe
&Std.Http.Server.Server -> Str -> Int -> Int -> Result[Int, Std.Http.Server.ServerError]Start, serve, and stop, for a caller that wants one call.
- logging
fn(Str) -> () -> fn(Std.Http.Server.Route.Request, fn(Std.Http.Server.Route.Request) -> Std.Http.Response) -> Std.Http.ResponseA step that writes a line about every request once its answer is known.
- portOf
&Std.Http.Server.Running -> IntWhich port a running server is on.
- run
&Std.Http.Server.Server -> &Std.Http.Server.Running -> Int -> Result[Int, Std.Http.Server.ServerError]Accept connections into a bounded queue consumed by a fixed worker pool.
- Running
A running server, and the switch that stops it.
- serveConnection
&Std.Http.Server.Server -> &Std.Net.Connection -> BoolServe one connection: read a request, answer it, and say whether the
- server
&Std.Http.Server.Route.Router -> Std.Http.Server.ServerA server over a router, with no middleware and the default limits.
- Server
A server, ready to be given an address.
- ServerError
Why a server could not start or could not keep serving.
- start
Str -> Int -> Result[Std.Http.Server.Running, Std.Http.Server.ServerError]Start listening, and answer what is needed to stop.
- stop
&Std.Http.Server.Running -> Result[(), Std.Http.Server.ServerError]Ask a server to stop.
- stopOnSignal
&Std.Http.Server.Running -> BoolStop the server when the supervisor asks the program to stop.
