Constructor
new WorkerWebsocket(connection)
Create and initialize a Strophe.WorkerWebsocket object.
Parameters:
Name | Type | Description |
---|---|---|
connection |
Connection | The Strophe.Connection |
Methods
_attach(callback)
Parameters:
Name | Type | Description |
---|---|---|
callback |
function |
_attachCallback(status, jid)
Parameters:
Name | Type | Description |
---|---|---|
status |
number | |
jid |
string |
_disconnect(pres)
Parameters:
Name | Type | Description |
---|---|---|
pres |
Element | Builder | This stanza will be sent before disconnecting. |
_messageHandler(m)
Parameters:
Name | Type | Description |
---|---|---|
m |
MessageEvent |
_messageHandler(m)
Parameters:
Name | Type | Description |
---|---|---|
m |
MessageEvent |
_messageHandler(m)
Parameters:
Name | Type | Description |
---|---|---|
m |
MessageEvent |
(private) _onWorkerMessage(ev)
function that handles messages received from the service worker
Parameters:
Name | Type | Description |
---|---|---|
ev |
MessageEvent |
_replaceMessageHandler()
Called by _onInitialMessage in order to replace itself with the general message handler. This method is overridden by WorkerWebsocket, which manages a websocket connection via a service worker and doesn't have direct access to the socket.