2.0.3
This commit is contained in:
parent
d9a234bf9b
commit
7f38d181a1
3 changed files with 6 additions and 5 deletions
|
@ -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`.
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue