ServerHandle class final

A running server that can be stopped without dropping work.

HttpServer.close stops accepting and, unforced, waits for open connections. What it does not do is tell you how many requests are still in flight, which is what a deployment needs before it takes the process away.

Properties

address InternetAddress
The address the server bound to.
final
hashCode int
The hash code for this object.
no setterinherited
inFlight int
How many requests are being handled right now.
no setter
pendingTasks int
How many background tasks are still running, when a registry was passed.
no setter
port int
The port the server bound to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

close({Duration drain = const Duration(seconds: 30)}) Future<bool>
Stops accepting, then waits for the requests already accepted.
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