Model HttpServer
http/server::HttpServer
Parameters
↳ const host:
Ip
(net/ip::Ip
)
↳ const port:
u16
Sources
⤇ failedBinding:
http/server::failedBinding
⤇ incoming:
http/server::incoming
with @HttpRequest
A HTTP server for general use.
The HTTP server provides configuration for receiving and responding to HTTP incoming requests.
host
: the network address to bind with.port
: the port to bind with.
HttpServer
aims to be used with connection
treatment.
Every time a new HTTP request matching a configured route comes, a new track is created with @HttpRequest
context.
ℹ️ If server binding fails, failedBinding
is emitted.
⚠️ Use HttpServer
with connection
treatment, as using incoming
source and outgoing
treatment directly should be done carefully.