RelicServer class

A Server backed by a dart:io HttpServer.

Properties

hashCode int
The hash code for this object.
no setterinherited
poweredByHeader String
The powered by header to use for responses.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
server HttpServer
The underlying HttpServer.
final
strictHeaders bool
Whether to enforce strict header parsing.
final
url Uri
no setter

Methods

close() Future<void>
mountAndStart(Handler handler) → void
Mounts a handler to the server. Only one handler can be mounted at a time, and starts listening for requests.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

createServer(RelicAddress address, int port, {SecurityContext? securityContext, int? backlog, bool shared = false, bool strictHeaders = true, String? poweredByHeader}) Future<RelicServer>
Creates a server with the given parameters.

Constants

defaultPoweredByHeader → const String
The default powered by header to use for responses.