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
|
# 2.0.0-rc.9
|
||||||
* Fix some bugs in the `HookedService` implementation that skipped
|
* Fix some bugs in the `HookedService` implementation that skipped
|
||||||
the outputs of `before` events.
|
the outputs of `before` events.
|
||||||
|
|
|
@ -7,7 +7,7 @@ export 'angel_http.dart';
|
||||||
export 'http_request_context.dart';
|
export 'http_request_context.dart';
|
||||||
export 'http_response_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) =>
|
Future<HttpServer> startShared(address, int port) =>
|
||||||
HttpServer.bind(address ?? '127.0.0.1', port ?? 0, shared: true);
|
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 'http2_response_context.dart';
|
||||||
import 'package:uuid/uuid.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,
|
class AngelHttp2 extends Driver<Socket, ServerTransportStream,
|
||||||
SecureServerSocket, Http2RequestContext, Http2ResponseContext> {
|
SecureServerSocket, Http2RequestContext, Http2ResponseContext> {
|
||||||
final ServerSettings settings;
|
final ServerSettings settings;
|
||||||
|
@ -47,7 +54,7 @@ class AngelHttp2 extends Driver<Socket, ServerTransportStream,
|
||||||
var addr = address is InternetAddress
|
var addr = address is InternetAddress
|
||||||
? address
|
? address
|
||||||
: new InternetAddress(address.toString());
|
: new InternetAddress(address.toString());
|
||||||
return SecureServerSocket.bind(addr, port, ctx);
|
return Future.sync(() => serverGenerator(addr, port, ctx));
|
||||||
}, useZone, settings);
|
}, useZone, settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: angel_framework
|
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.
|
description: A high-powered HTTP server with dependency injection, routing and much more.
|
||||||
author: Tobe O <thosakwe@gmail.com>
|
author: Tobe O <thosakwe@gmail.com>
|
||||||
homepage: https://github.com/angel-dart/angel_framework
|
homepage: https://github.com/angel-dart/angel_framework
|
||||||
|
|
Loading…
Reference in a new issue