Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 118a1aa commit 6779ee5Copy full SHA for 6779ee5
Socket/README.md
@@ -19,6 +19,12 @@ var mySocket = new Socket();
19
20
## Methods
21
22
+### close
23
+
24
+```js
25
+mySocket.close();
26
+```
27
28
### onOpen
29
30
```js
Socket/index.js
@@ -17,6 +17,7 @@ function Socket() {
17
EventEmitter.call(this);
18
var wsUrl = 'wss://ws.blockchain.info/inv';
var socket = new WebSocket(wsUrl);
+ this.close = socket.close.bind(socket);
this.op = function (op, data) {
var message = JSON.stringify(extend({ op: op }, data || {}));
0 commit comments