new WindowSocket(_windowopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
_window |
Window |
<optional> |
specify other window to listen |
Classes
Methods
(static) broadcast(…args) → {WindowSocket}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
Array.<any> |
<repeatable> |
Returns:
- Type
- WindowSocket
(static) clients() → {Array.<WindowSocket.Client>}
Returns:
- Type
- Array.<WindowSocket.Client>
(static) encoders(encoders) → {WindowSocket}
update encoders
.update encoders
Parameters:
Name | Type | Description |
---|---|---|
encoders |
Array.<WindowSocket.Encoder> |
Returns:
- Type
- WindowSocket
(static) encoders() → {Array.<WindowSocket.Encoder>}
get current encoders
.get current encoders
Returns:
- Type
- Array.<WindowSocket.Encoder>
(static) fire(…args) → {WindowSocket}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
args |
Array.<any> |
<repeatable> |
Returns:
- Type
- WindowSocket
(static) start() → {WindowSocket}
Returns:
- Type
- WindowSocket
(static) stop() → {WindowSocket}
Returns:
- Type
- WindowSocket
(static) validateSource(event) → {WindowSocket.Client}
Validate Message Event Source
.Validate Message Event Source
Parameters:
Name | Type | Description |
---|---|---|
event |
MessageEvent |
Returns:
- Type
- WindowSocket.Client
Events
connect
Parameters:
Type | Description |
---|---|
WindowSocket.Client |
message
Type:
- object
message:error
Type:
- MessageEvent
message:raw
Type:
- MessageEvent