Creates a new ServerConfig
Creates a new ServerConfig
the interface to bind to, default is localhost
the port to bind to, default is 8080
the actor id the HttpServer is to receive, default is spray-can-server
the id of the actor to dispatch the generated RequestContext messages to,
default is spray-root-service
the id of the actor to dispatch the generated Timeout messages to,
default is spray-root-service
the number of milliseconds the timeout actor has to complete the request after having received
a Timeout message. If this time has elapsed without the request being completed the HttpServer
completes the request by calling its timeoutTimeoutResponse
method.
the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered
an optional function creating a "stream actor", an per-request actor receiving the parts
of a chunked (streaming) request as separate messages. If None
the HttpServer will use a new
BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked
content before dispatching it as a regular RequestContext to the service actor.
the interface to bind to, default is localhost
The time period in milliseconds that an open HTTP connection has to be idle before automatically being closed.
The time period in milliseconds that an open HTTP connection has to be idle before automatically being closed. Set to zero to disable connection timeouts.
Default: 10,000 ms = 10 seconds
The configuration of the spray-can message parser.
The configuration of the spray-can message parser.
the port to bind to, default is 8080
The size of the read buffer used for processing incoming messages.
The size of the read buffer used for processing incoming messages. Usually there should be little reason to configure it to a value different from its default of 8192 (bytes).
The reapingCycle
is the time in milliseconds between two runs of the "reaper", which is the logic that closes
open HTTP connections whose idle timeout has exceeded the configured value.
The reapingCycle
is the time in milliseconds between two runs of the "reaper", which is the logic that closes
open HTTP connections whose idle timeout has exceeded the configured value. Larger values (very slightly) increase
overall server or client efficiency (since less time is being spent looking for timed out connections) whereas
smaller values increase the precision with which idle connections are really closed after the configured idle
timeout. The default value is 500, which means that the reaper runs twice per second.
The time period in milliseconds that are response has to be produced by the application (in the case of the ServerConfig) or received by the server (in the case of the ClientConfig.
The time period in milliseconds that are response has to be produced by the application (in the case of the ServerConfig) or received by the server (in the case of the ClientConfig. Set to zero to disable request timeouts. The default value is 5000 ms = 5 seconds.
the actor id the HttpServer is to receive, default is spray-can-server
the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered
the id of the actor to dispatch the generated RequestContext messages to,
default is spray-root-service
an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages.
an optional function creating a "stream actor", an per-request actor receiving the parts
of a chunked (streaming) request as separate messages. If None
the HttpServer will use a new
BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked
content before dispatching it as a regular RequestContext to the service actor.
the id of the actor to dispatch the generated Timeout messages to,
default is spray-root-service
The timeoutCycle
is the time in milliseconds between two runs of the logic that determines which of all open
requests have timed out.
The timeoutCycle
is the time in milliseconds between two runs of the logic that determines which of all open
requests have timed out. Larger values (very slightly) increase overall server or client efficiency (since less
time is being spent looking for timed out requests) whereas smaller values increase the precision with which
timed out requests are really reacted on after the configured timeout time has elapsed.
The default value is 200.
the number of milliseconds the timeout actor has to complete the request after having received a Timeout message.
the number of milliseconds the timeout actor has to complete the request after having received
a Timeout message. If this time has elapsed without the request being completed the HttpServer
completes the request by calling its timeoutTimeoutResponse
method.
The
ServerConfig
configures an instance of the HttpServer actor.the interface to bind to, default is
localhost
the port to bind to, default is
8080
the actor id the HttpServer is to receive, default is
spray-can-server
the id of the actor to dispatch the generated RequestContext messages to, default is
spray-root-service
the id of the actor to dispatch the generated Timeout messages to, default is
spray-root-service
the number of milliseconds the timeout actor has to complete the request after having received a Timeout message. If this time has elapsed without the request being completed the
HttpServer
completes the request by calling itstimeoutTimeoutResponse
method.the value of the "Server" response header set by the HttpServer, if empty the "User-Agent" header will not be rendered
an optional function creating a "stream actor", an per-request actor receiving the parts of a chunked (streaming) request as separate messages. If
None
the HttpServer will use a new BufferingRequestStreamActor instance for every incoming chunked request, which buffers chunked content before dispatching it as a regular RequestContext to the service actor.