Accept close code/message via websocket/resources
This commit is contained in:
parent
8170a7baae
commit
d9fe783488
5 changed files with 26 additions and 14 deletions
|
@ -97,8 +97,9 @@
|
|||
return new OutgoingWebSocketRequest(options, socket);
|
||||
};
|
||||
|
||||
this.close = function() {
|
||||
socket.close(3000);
|
||||
this.close = function(code, reason) {
|
||||
if (!code) { code = 3000; }
|
||||
socket.close(code, reason);
|
||||
};
|
||||
|
||||
socket.onmessage = function(socketMessage) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue