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.

Implementers

Constructors

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

Properties

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

Methods

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. [...]
inherited
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
Returns a string representation of this object.
inherited
writeStringToResponse(Response response, String value) → void
writeToResponse(Response response, List<int> data) → void

Operators

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

Static Methods

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