nali 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,6 +9,7 @@ Nali.extend Connection:
|
|
9
9
|
@dispatcher = new WebSocket @Application.wsServer
|
10
10
|
@dispatcher.onopen = ( event ) => @onOpen event
|
11
11
|
@dispatcher.onclose = ( event ) => @onClose event
|
12
|
+
@dispatcher.onerror = ( event ) => @onError event
|
12
13
|
@dispatcher.onmessage = ( event ) => @onMessage JSON.parse event.data
|
13
14
|
@keepAlive()
|
14
15
|
@
|
@@ -27,6 +28,9 @@ Nali.extend Connection:
|
|
27
28
|
onClose: ( event ) ->
|
28
29
|
@connected = false
|
29
30
|
@trigger 'close'
|
31
|
+
|
32
|
+
onError: ( event ) ->
|
33
|
+
console.warn 'Connection error %O', event
|
30
34
|
|
31
35
|
send: ( msg ) ->
|
32
36
|
@open() unless @connected
|
data/lib/nali/connection.rb
CHANGED
data/lib/nali/version.rb
CHANGED