Constructor
new Channel(check)
- Description:
Constructor accepting check function
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
check |
function | to check/filter message for specific channel |
Methods
attach(worker) → {object}
- Description:
Add worker
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
worker |
object | worker to add to channel |
Returns:
self
- Type
- object
remove()
- Description:
Removing worker from channel
- Source:
send(_id, cmd, data)
- Description:
Send message to this channel
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
_id |
string | id of channel |
cmd |
object | command |
data |
object | additional data |