Jaguar constructor
- {String address = "0.0.0.0",
- int port = 8080,
- bool multiThread = false,
- SecurityContext securityContext,
- bool autoCompress = false,
- ErrorWriter errorWriter,
- SessionManager sessionManager,
- FutureOr<
void> onRouteServed(- Context ctx
Constructs an instance of Jaguar with given configuration.
address
:port
is the address and port at which the HTTP requests are
listened.
multiThread
determines if the port can be serviced from multiple isolates.
securityContext
is used to configure HTTPS support.
autoCompress
determines if the response should be automatically compressed.
errorWriter
is used to write custom error page Response in cases of HTTP
errors.
sessionManager
provides ability to use custom session managers.
Implementation
Jaguar({
String address = "0.0.0.0",
int port = 8080,
bool multiThread = false,
SecurityContext securityContext,
this.autoCompress = false,
ErrorWriter errorWriter,
SessionManager sessionManager,
this.onRouteServed,
}) : errorWriter = errorWriter ?? DefaultErrorWriter(),
sessionManager = sessionManager ?? JaguarSessionManager(),
_connectionInfos = [
ConnectTo(
address: address,
port: port,
securityContext: securityContext,
multiThread: multiThread)
];