@live-change/dao-websocket 0.2.19 → 0.3.2
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.
|
@@ -4,8 +4,8 @@ const Connection = rd.ReactiveConnection
|
|
|
4
4
|
const debug = require('debug')('reactive-dao-ws')
|
|
5
5
|
|
|
6
6
|
class WebSocketConnection extends Connection {
|
|
7
|
-
constructor(
|
|
8
|
-
super(
|
|
7
|
+
constructor(credentials, url, settings) {
|
|
8
|
+
super(credentials, settings)
|
|
9
9
|
this.url = url
|
|
10
10
|
this.initialize()
|
|
11
11
|
}
|
|
@@ -59,7 +59,7 @@ class WebSocketConnection extends Connection {
|
|
|
59
59
|
|
|
60
60
|
dispose() {
|
|
61
61
|
debug("close")
|
|
62
|
-
|
|
62
|
+
super.dispose()
|
|
63
63
|
this.connection.close()
|
|
64
64
|
}
|
|
65
65
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@live-change/dao-websocket",
|
|
3
|
-
"version": "0.2
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"author": {
|
|
5
5
|
"email": "m8@em8.pl",
|
|
6
6
|
"name": "Michał Łaszczewski",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"url": "https://github.com/live-change/dao-websocket/issues"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@live-change/dao": "^0.
|
|
13
|
+
"@live-change/dao": "^0.3.10",
|
|
14
14
|
"bufferutil": "^4.0.3",
|
|
15
15
|
"debug": "^4.3.1",
|
|
16
16
|
"supports-color": "^6.1.0",
|
|
@@ -33,7 +33,6 @@
|
|
|
33
33
|
"name": "Michał Łaszczewski"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
|
-
"optionalDependencies": {},
|
|
37
36
|
"readme": "README.md",
|
|
38
37
|
"repository": {
|
|
39
38
|
"type": "git",
|
package/tests/connection.js
CHANGED
|
@@ -28,7 +28,7 @@ test("time value", (t) => {
|
|
|
28
28
|
console.log('Server is listening on port',port);
|
|
29
29
|
})
|
|
30
30
|
|
|
31
|
-
let wsServer = new WebSocketServer({httpServer, autoAcceptConnections: false})
|
|
31
|
+
let wsServer = new WebSocketServer({ httpServer, autoAcceptConnections: false })
|
|
32
32
|
wsServer.on("request",(request) => {
|
|
33
33
|
t.pass("WebSocket request made")
|
|
34
34
|
let serverConnection = new rdws.server(request)
|
|
@@ -36,7 +36,7 @@ test("time value", (t) => {
|
|
|
36
36
|
})
|
|
37
37
|
|
|
38
38
|
setTimeout(()=> {
|
|
39
|
-
client = new rdws.client(sessionId, "ws://localhost:"+port+'/ws', {
|
|
39
|
+
client = new rdws.client({ sessionId }, "ws://localhost:"+port+'/ws', {
|
|
40
40
|
onConnect: () => t.pass("connected"),
|
|
41
41
|
delay: 50
|
|
42
42
|
})
|