tlsd 2.4.0 → 2.4.1
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.
package/package.json
CHANGED
package/server_static/rpc/rpc.js
CHANGED
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
// Send msg via Websocket if it's less than around 5K stringified, otherwise use POST
|
|
7
7
|
RPC( msg_object, okay, fail );
|
|
8
8
|
|
|
9
|
-
RPC.
|
|
9
|
+
RPC.connect( function() {
|
|
10
10
|
RPC( { action: "Hello, I'm a client" }, rsp => {
|
|
11
11
|
console.log( rsp ) // "Welcome client, I'm a server"
|
|
12
12
|
}, error => {
|
|
13
13
|
alert( error )
|
|
14
14
|
} );
|
|
15
|
-
};
|
|
15
|
+
} );
|
|
16
16
|
|
|
17
17
|
RPC.debug = true; // enable on console debug output
|
|
18
18
|
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
const connect = function( cb ) {
|
|
219
|
-
if( connected ) {
|
|
219
|
+
if( RPC.connected ) {
|
|
220
220
|
cb();
|
|
221
221
|
} else {
|
|
222
222
|
RPC.on_connect = cb;
|