From e692f27972b237fa24c22d147c05076d1b3c6702 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Sun, 28 Apr 2019 13:44:47 -0400 Subject: [PATCH] 2.0.0-rc.10 --- CHANGELOG.md | 4 ++++ lib/src/http/http.dart | 2 +- lib/src/http2/angel_http2.dart | 9 ++++++++- pubspec.yaml | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85a80a33..739dacb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/lib/src/http/http.dart b/lib/src/http/http.dart index 3784acb8..44ab4cdb 100644 --- a/lib/src/http/http.dart +++ b/lib/src/http/http.dart @@ -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 startShared(address, int port) => HttpServer.bind(address ?? '127.0.0.1', port ?? 0, shared: true); diff --git a/lib/src/http2/angel_http2.dart b/lib/src/http2/angel_http2.dart index c062f0de..06e5875b 100644 --- a/lib/src/http2/angel_http2.dart +++ b/lib/src/http2/angel_http2.dart @@ -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 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 { final ServerSettings settings; @@ -47,7 +54,7 @@ class AngelHttp2 extends Driver serverGenerator(addr, port, ctx)); }, useZone, settings); } diff --git a/pubspec.yaml b/pubspec.yaml index dc609baf..5135371c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -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 homepage: https://github.com/angel-dart/angel_framework