2.0.0-rc.10
This commit is contained in:
parent
0420046d7e
commit
e692f27972
4 changed files with 14 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue