1.1.0-alpha+3

This commit is contained in:
Tobe O 2017-11-18 00:15:29 -05:00
parent 75cdcc8853
commit d35ebbd0de
3 changed files with 7 additions and 4 deletions

View file

@ -25,7 +25,8 @@ main() async {
var ws = new AngelWebSocket();
// Apply configuration
// This is a plug-in. It hooks all your services,
// to automatically broadcast events.
await app.configure(ws.configureServer);
// Listen for requests at `/ws`.
@ -58,6 +59,9 @@ import "package:angel_websocket/server.dart";
@Expose("/")
class MyController extends WebSocketController {
// A reference to the WebSocket plug-in is required.
MyController(AngelWebSocket ws):super(ws);
@override
void onConnect(WebSocketContext socket) {
// On connect...

View file

@ -75,8 +75,7 @@ class WebSockets extends BaseWebSocketClient {
return completer.complete(new HtmlWebSocketChannel(socket));
})
..onError.listen((e) {
var err = e as ErrorEvent;
if (!completer.isCompleted) return completer.completeError(err.error);
if (!completer.isCompleted) return completer.completeError(e is ErrorEvent ? e.error : e);
});
return completer.future;

View file

@ -2,7 +2,7 @@ name: angel_websocket
description: WebSocket plugin for Angel.
environment:
sdk: ">=1.19.0"
version: 1.1.0-alpha+2
version: 1.1.0-alpha+3
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_websocket
dependencies: