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
|
|
@ -17,8 +17,8 @@
|
|||
/*
|
||||
* var socket = TextSecureWebSocket(url);
|
||||
*
|
||||
* Returns an adamantium-reinforced super socket, capable of sending
|
||||
* app-level keep alives and automatically reconnecting.
|
||||
* Returns an adamantium-reinforced super socket, capable of
|
||||
* automatically reconnecting.
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
@ -37,7 +37,10 @@ TextSecureWebSocket = function (url, opts) {
|
|||
onclose : function() {},
|
||||
onerror : function() {},
|
||||
getStatus : function() { return socket.readyState; },
|
||||
close : function() { calledClose = true; socket.close(); }
|
||||
close : function(code, reason) {
|
||||
calledClose = true;
|
||||
socket.close(code, reason);
|
||||
}
|
||||
};
|
||||
var error;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue