Driver<Request, Response, Server extends Stream<Request>, RequestContextType extends RequestContext, ResponseContextType extends ResponseContext> class

Base driver class for Angel implementations.

Powers both AngelHttp and AngelHttp2.



Driver(Angel app, Future<Server> serverGenerator(dynamic, int), {bool useZone = true})


app Angel
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
server → Server
The native server running this instance.
serverGenerator Future<Server> Function(dynamic, int)
The function used to bind this instance to a server..
uri Uri
The path at which this server is listening for requests.
useZone bool


addCookies(Response response, Iterable<Cookie> cookies) → void
close() Future<Server>
Shuts down the underlying server.
closeResponse(Response response) Future
createRequestContext(Request request, Response response) Future<RequestContextType>
createResponseContext(Request request, Response response, [RequestContextType correspondingRequest]) Future<ResponseContextType>
createResponseStreamFromRawRequest(Request request) Stream<Response>
generateServer(dynamic address, int port) Future<Server>
handleAngelHttpException(AngelHttpException e, StackTrace st, RequestContext req, ResponseContext res, Request request, Response response, {bool ignoreFinalizers = false}) Future
Handles an AngelHttpException.
handleRawRequest(Request request, Response response) Future
Handles a single request.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
sendResponse(Request request, Response response, RequestContext req, ResponseContext res, {bool ignoreFinalizers = false}) Future
Sends a response.
setChunkedEncoding(Response response, bool value) → void
setContentLength(Response response, int length) → void
setHeader(Response response, String key, String value) → void
setStatusCode(Response response, int value) → void
startServer([dynamic address, int port]) Future<Server>
Starts, and returns the server.
toString() String
A string representation of this object. [...]
writeStringToResponse(Response response, String value) → void
writeToResponse(Response response, List<int> data) → void


operator ==(Object other) bool
The equality operator. [...]

Static Methods

runPipeline<RequestContextType extends RequestContext, ResponseContextType extends ResponseContext>(MiddlewarePipelineIterator<RequestHandler> it, RequestContextType req, ResponseContextType res, Angel app) Future<void>
Runs a MiddlewarePipeline.