Dartness class Null safety
A server that delivers content, such as web pages, using the HTTP protocol by HttpServer.
Constructors
-
Dartness({int port = 8080, InternetAddress? internetAddress, Iterable<
Object> controllers = const [], Iterable<Middleware> middlewares = const []}) -
Creates a DefaultDartnessServer that listens on the specified
port
andinternetAddress
.
Properties
- hashCode → int
-
The hash code for this object.
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
addController(
Object controller) → void -
Add
controller
into Dartness and handles the methods annotated with Bind children to Controller.path and Bind.path. -
addMiddleware(
Middleware middleware) → void - Adds a middleware in order to listen between an http request
-
close(
{bool force = false}) → Future? - Permanently stops the Dartness server from listening for new connections. This closes the Stream of HttpRequests with a done event.
-
create(
{bool logRequest = false}) → Future< void> -
Starts the
_server
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited