DefaultDartnessServer class Null safety
A server that delivers content, such as web pages, using the HTTP protocol by HttpServer.
- Implemented types
Constructors
- DefaultDartnessServer(int _port, {InternetAddress? internetAddress})
-
Creates a DefaultDartnessServer that listens on the specified
_port
andinternetAddress
.
Properties
-
controllers
→ Set<
Object> -
read-only
- hashCode → int
-
The hash code for this object.
read-only, inherited
- isStarted → bool
-
Returns
true
if the server is listening for connections.read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
addController(
Object controller) → void -
Add
controller
into_controllers
and handles the methods annotated with Bind children to Controller.path and Bind.path.override -
addInterceptor(
DartnessInterceptor interceptor) → void -
override
-
addMiddleware(
DartnessMiddleware middleware) → void -
Adds a middleware in order to listen between an http request
and the applications running on it.
override
-
getAddress(
) → InternetAddress -
Returns the InternetAddress that the server is listening on.
override
-
getPort(
) → int -
Returns the port that the server is listening on.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
start(
) → Future< void> -
Starts an HttpServer that listens by the specified
_internetAddress
and_port
.override -
stop(
{bool force = false}) → Future< void> -
Permanently stops the HttpServer server from listening for new
connections. This closes the Stream of HttpRequests with a
done event.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited