This commit is contained in:
thosakwe 2017-04-15 15:02:17 -04:00
parent ab7526e624
commit ac94a2db9c
5 changed files with 50 additions and 4 deletions

47
.gitignore vendored
View file

@ -27,4 +27,49 @@ doc/api/
pubspec.lock pubspec.lock
.idea .idea
log.txt log.txt
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff:
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/dictionaries
# Sensitive or high-churn files:
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.xml
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
# Gradle:
.idea/**/gradle.xml
.idea/**/libraries
# Mongo Explorer plugin:
.idea/**/mongoSettings.xml
## File-based project format:
*.iws
## Plugin-specific files:
# IntelliJ
/out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

View file

@ -1,5 +1,5 @@
# angel_websocket # angel_websocket
[![1.0.4+1](https://img.shields.io/badge/pub-1.0.4+1-brightgreen.svg)](https://pub.dartlang.org/packages/angel_websocket) [![1.0.4+2](https://img.shields.io/badge/pub-1.0.4+2-brightgreen.svg)](https://pub.dartlang.org/packages/angel_websocket)
[![build status](https://travis-ci.org/angel-dart/websocket.svg)](https://travis-ci.org/angel-dart/websocket) [![build status](https://travis-ci.org/angel-dart/websocket.svg)](https://travis-ci.org/angel-dart/websocket)
WebSocket plugin for Angel. WebSocket plugin for Angel.

View file

@ -55,7 +55,7 @@ class WebSockets extends BaseWebSocketClient {
@override @override
Future<WebSocketChannel> getConnectedWebSocket() { Future<WebSocketChannel> getConnectedWebSocket() {
var socket = new WebSocket(authToken?.isNotEmpty == true ? basePath : '$basePath?token=$authToken'); var socket = new WebSocket(authToken?.isNotEmpty == true ? '$basePath?token=$authToken' : basePath );
var completer = new Completer<WebSocketChannel>(); var completer = new Completer<WebSocketChannel>();
socket socket

View file

@ -67,6 +67,7 @@ class WebSocketController extends Controller {
socket.onData.listen((data) => onData(data, socket)); socket.onData.listen((data) => onData(data, socket));
socket.onAction.listen((WebSocketAction action) async { socket.onAction.listen((WebSocketAction action) async {
socket.request.inject(WebSocketAction, action);
await onAction(action, socket); await onAction(action, socket);
if (_handlers.containsKey(action.eventName)) { if (_handlers.containsKey(action.eventName)) {

View file

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