WebSocketResource exposes socket.close()
Allows for simplification of the keepalive construct.
This commit is contained in:
parent
98edd3939b
commit
8170a7baae
5 changed files with 16 additions and 10 deletions
|
@ -97,6 +97,10 @@
|
|||
return new OutgoingWebSocketRequest(options, socket);
|
||||
};
|
||||
|
||||
this.close = function() {
|
||||
socket.close(3000);
|
||||
};
|
||||
|
||||
socket.onmessage = function(socketMessage) {
|
||||
var blob = socketMessage.data;
|
||||
var reader = new FileReader();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue