AngelHttp2 class
Adapts package:http2
's ServerTransportConnection
to serve Angel.
- Inheritance
-
- Object
- Driver<
Socket, ServerTransportStream, SecureServerSocket, Http2RequestContext, Http2ResponseContext> - AngelHttp2
Constructors
- AngelHttp2(Angel app, SecurityContext securityContext, {bool useZone = true, bool allowHttp1 = false, ServerSettings? settings})
-
factory
-
AngelHttp2.custom(Angel app, SecurityContext ctx, Future<
SecureServerSocket> serverGenerator(InternetAddress? address, int port, SecurityContext ctx), {bool useZone = true, bool allowHttp1 = false, ServerSettings? settings}) -
factory
Properties
- app → Angel
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
onHttp1
→ Stream<
HttpRequest> -
Fires when an HTTP/1.x request is received.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- server ↔ SecureServerSocket?
-
The native server running this instance.
getter/setter pairinherited
-
serverGenerator
→ Future<
SecureServerSocket> Function(dynamic, int) -
The function used to bind this instance to a server..
finalinherited
- settings → ServerSettings?
-
final
- socket → SecureServerSocket?
-
no setter
- uri → Uri
-
The path at which this server is listening for requests.
no setteroverride
- useZone → bool
-
finalinherited
Methods
-
addCookies(
ServerTransportStream response, Iterable< Cookie> cookies) → void -
override
-
close(
) → Future< void> -
Shuts down the underlying server.
override
-
closeResponse(
ServerTransportStream response) → Future -
override
-
createRequestContext(
Socket request, ServerTransportStream response) → Future< Http2RequestContext> -
override
-
createResponseContext(
Socket request, ServerTransportStream response, [Http2RequestContext? correspondingRequest]) → Future< Http2ResponseContext> -
override
-
createResponseStreamFromRawRequest(
Socket request) → Stream< ServerTransportStream> -
override
-
generateServer(
[dynamic address, int? port]) → Future< SecureServerSocket> -
override
-
handleAngelHttpException(
AngelHttpException e, StackTrace st, RequestContext? req, ResponseContext? res, Socket request, ServerTransportStream response, {bool ignoreFinalizers = false}) → Future -
Handles an AngelHttpException.
inherited
-
handleRawRequest(
Socket request, ServerTransportStream response) → Future -
Handles a single request.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendResponse(
Socket request, ServerTransportStream response, RequestContext req, ResponseContext res, {bool ignoreFinalizers = false}) → Future -
Sends a response.
inherited
-
setChunkedEncoding(
ServerTransportStream response, bool value) → void -
override
-
setContentLength(
ServerTransportStream response, int length) → void -
override
-
setHeader(
ServerTransportStream response, String key, String? value) → void -
override
-
setStatusCode(
ServerTransportStream response, int value) → void -
override
-
startServer(
[dynamic address, int port = 0]) → Future< SecureServerSocket> -
Starts, and returns the server.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
writeStringToResponse(
ServerTransportStream response, String value) → void -
override
-
writeToResponse(
ServerTransportStream response, List< int> data) → void -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited