Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/externals/javelin/lib/WebSocket.js
| Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | close: function() { | ||||
| return; | return; | ||||
| } | } | ||||
| this._shouldClose = true; | this._shouldClose = true; | ||||
| this._socket.close(); | this._socket.close(); | ||||
| }, | }, | ||||
| /** | /** | ||||
| * Disconnect abruptly, prompting a reconnect. | |||||
| */ | |||||
| reconnect: function() { | |||||
| if (!this._isOpen) { | |||||
| return; | |||||
| } | |||||
| this._socket.close(); | |||||
| }, | |||||
| /** | |||||
| * Get the current reconnect delay (in milliseconds). | |||||
| */ | |||||
| getReconnectDelay: function() { | |||||
| return this._delayUntilReconnect; | |||||
| }, | |||||
| /** | |||||
| * Callback for connection open. | * Callback for connection open. | ||||
| */ | */ | ||||
| _onopen: function() { | _onopen: function() { | ||||
| this._isOpen = true; | this._isOpen = true; | ||||
| // Reset the reconnect delay, since we connected successfully. | // Reset the reconnect delay, since we connected successfully. | ||||
| this._resetDelay(); | this._resetDelay(); | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||