2.0.0-rc.10

This commit is contained in:
Tobe O 2019-04-28 13:44:47 -04:00
parent 0420046d7e
commit e692f27972
4 changed files with 14 additions and 3 deletions

View file

@ -1,3 +1,7 @@
# 2.0.0-rc.10
* Fix an error that prevented `AngelHttp2.custom` from working properly.
* Add `startSharedHttp2`.
# 2.0.0-rc.9
* Fix some bugs in the `HookedService` implementation that skipped
the outputs of `before` events.

View file

@ -7,7 +7,7 @@ export 'angel_http.dart';
export 'http_request_context.dart';
export 'http_response_context.dart';
/// Boots a shared server instance. Use this if launching multiple isolates
/// Boots a shared server instance. Use this if launching multiple isolates.
Future<HttpServer> startShared(address, int port) =>
HttpServer.bind(address ?? '127.0.0.1', port ?? 0, shared: true);

View file

@ -9,6 +9,13 @@ import 'http2_request_context.dart';
import 'http2_response_context.dart';
import 'package:uuid/uuid.dart';
/// Boots a shared server instance. Use this if launching multiple isolates.
Future<SecureServerSocket> startSharedHttp2(
address, int port, SecurityContext ctx) {
return SecureServerSocket.bind(address, port, ctx, shared: true);
}
/// Adapts `package:http2`'s [ServerTransportConnection] to serve Angel.
class AngelHttp2 extends Driver<Socket, ServerTransportStream,
SecureServerSocket, Http2RequestContext, Http2ResponseContext> {
final ServerSettings settings;
@ -47,7 +54,7 @@ class AngelHttp2 extends Driver<Socket, ServerTransportStream,
var addr = address is InternetAddress
? address
: new InternetAddress(address.toString());
return SecureServerSocket.bind(addr, port, ctx);
return Future.sync(() => serverGenerator(addr, port, ctx));
}, useZone, settings);
}

View file

@ -1,5 +1,5 @@
name: angel_framework
version: 2.0.0-rc.9
version: 2.0.0-rc.10
description: A high-powered HTTP server with dependency injection, routing and much more.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework