This commit is contained in:
Tobe O 2019-05-01 18:53:30 -04:00
parent d9a234bf9b
commit 7f38d181a1
3 changed files with 6 additions and 5 deletions

View file

@ -1,3 +1,6 @@
# 2.0.3
* Remove `WebSocketController.plugin`.
# 2.0.2
* Update `stream_channel` to `2.0.0`.
* Use `angel_framework^@2.0.0-rc.0`.

View file

@ -9,19 +9,17 @@ class ExposeWs {
/// A special controller that also supports WebSockets.
class WebSocketController extends Controller {
/// The plug-in instance powering this controller.
final AngelWebSocket ws;
Map<String, MethodMirror> _handlers = {};
Map<String, Symbol> _handlerSymbols = {};
/// The plug-in instance powering this controller.
AngelWebSocket plugin;
WebSocketController(this.ws) : super();
/// Sends an event to all clients.
void broadcast(String eventName, data, {filter(WebSocketContext socket)}) {
plugin.batchEvent(new WebSocketEvent(eventName: eventName, data: data),
ws.batchEvent(new WebSocketEvent(eventName: eventName, data: data),
filter: filter);
}

View file

@ -2,7 +2,7 @@ name: angel_websocket
description: Support for using pkg:angel_client with WebSockets. Designed for Angel.
environment:
sdk: ">=2.0.0-dev <3.0.0"
version: 2.0.2
version: 2.0.3
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_websocket
dependencies: