Updated websocket

This commit is contained in:
thomashii 2021-07-15 16:14:52 +08:00
parent 38cc17e381
commit a6f24189e4
4 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,10 @@
# Change Log
## 4.0.2
* Fixed authentication unit test
* All 3 unit tests passed
## 4.0.1
* Updated README

View file

@ -1,12 +1,12 @@
# Angel3 Websocket Library
[![version](https://img.shields.io/badge/pub-v4.0.1-brightgreen)](https://pub.dartlang.org/packages/angel3_websocket)
[![version](https://img.shields.io/badge/pub-v4.0.2-brightgreen)](https://pub.dartlang.org/packages/angel3_websocket)
[![Null Safety](https://img.shields.io/badge/null-safety-brightgreen)](https://dart.dev/null-safety)
[![Gitter](https://img.shields.io/gitter/room/angel_dart/discussion)](https://gitter.im/angel_dart/discussion)
[![License](https://img.shields.io/github/license/dukefirehawk/angel)](https://github.com/dukefirehawk/angel/tree/angel3/packages/websocket/LICENSE)
WebSocket plugin for Angel3. This plugin broadcasts events from hooked services via WebSockets. In addition, it adds itself to the app's IoC container as `AngelWebSocket`, so that it can be used in controllers as well.
WebSocket plugin for Angel3 framework. This plugin broadcasts events from hooked services via WebSockets. In addition, it adds itself to the app's IoC container as `AngelWebSocket`, so that it can be used in controllers as well.
WebSocket contexts are add to `req.properties` as `'socket'`.

View file

@ -1,6 +1,6 @@
name: angel3_websocket
description: This library provides WebSockets support for Angel3 framework.
version: 4.0.1
version: 4.0.2
homepage: https://angel3-framework.web.app/
repository: https://github.com/dukefirehawk/angel/tree/angel3/packages/websocket
environment:
@ -22,4 +22,6 @@ dev_dependencies:
angel3_model: ^3.0.0
pedantic: ^1.11.0
test: ^1.17.4

View file

@ -35,6 +35,7 @@ void main() {
var sock = AngelWebSocket(app);
await app.configure(sock.configureServer);
app.all('/ws', sock.handleRequest);
app.logger = Logger('angel_auth')..onRecord.listen(print);