In this namespace you will find classes and methods for handling data.
Members
defaults
PropertiesName | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url | string | Defines the resource that you wish to fetch. | ||||||||||||||||||||
connection | Object | Properties
|
(static) instanceSymbol
This method is called by the
instanceof
operator.This method is called by the instanceof
operator.
Methods
attachObserver(observer) → {ProxyObserver}
Attach a new observer
.Attach a new observer
Parameters:
Name | Type | Description |
---|---|---|
observer | Observer |
Returns:
- Type:
- ProxyObserver
close(codeopt, reasonopt) → {Promise}
This method closes the connection.
This method closes the connection.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
code | Number | <optional> | 1000 | The close code. |
reason | String | <optional> | "" | The close reason. |
Returns:
- Type:
- Promise
connect() → {Promise}
Returns:
- Type:
- Promise
containsObserver(observer) → {boolean}
Parameters:
Name | Type | Description |
---|---|---|
observer | Observer |
Returns:
- Type:
- boolean
dataReceived() → {boolean}
Are there any messages in the receive queue?
.Are there any messages in the receive queue?
Returns:
- Type:
- boolean
detachObserver(observer) → {ProxyObserver}
Detach a observer
.Detach a observer
Parameters:
Name | Type | Description |
---|---|---|
observer | Observer |
Returns:
- Type:
- ProxyObserver
isConnected() → {boolean}
Returns:
- Type:
- boolean
peek() → {Object}
Get Message from the receive queue, but do not remove it.
Get Message from the receive queue, but do not remove it.
Returns:
- Type:
- Object
poll() → {Message}
Polls the receive queue for new messages.
Polls the receive queue for new messages.
Returns:
- Type:
- Message
send(message) → {Promise}
Parameters:
Name | Type | Description |
---|---|---|
message | Message | |
Returns:
- Type:
- Promise