DoxServer class
Constructors
- DoxServer()
-
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- httpServer ↔ HttpServer
-
the http server. a
NativeHttpServer(dox_http_native) or the dart:io one. both have the sameHttpServerAPI.getter/setter pair - responseHandler ↔ ResponseHandlerInterface?
-
set responseHandler
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
{bool force = false}) → Future< void> - close http server
-
listen(
int port, {Object? address, Function? onError, int? isolateId}) → Future< HttpServer> -
listen the request. With no
addressit listens on all interfaces. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setResponseHandler(
ResponseHandlerInterface? handler) → void - set response handler
-
shutdown(
Duration timeout) → Future< void> -
Graceful stop: no new connections, open requests get
timeoutto finish. Then every connection is closed. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
hostFor(
String? configured) → String? -
The host to listen on:
configured, elseAPP_HOST, else null (all interfaces). -
portFor(
int configured) → int -
The port to listen on.
APP_PORTin the env meansconfigured(the app reads it intoserverPort). With noAPP_PORT,PORTwins: Cloud Run, Fly, Render and Heroku tell the app its port with it. -
usesNative(
{bool log = false}) → bool -
true when listen will use the native server (dox_http_native).
logprints why it does not, once.