MmrpNode | mage
Hierarchy
- MmrpNode
Index
Constructors
constructor
- new
Mmrp Node(role: "relay" | "client" | "both", cfg: any, clusterId: string): MmrpNode
-
Parameters
-
role: "relay" | "client" | "both"
-
cfg: any
-
clusterId: string
Returns MmrpNode
-
Methods
broadcast
- broadcast(envelope: MmrpEnvelope, routingStyle?: string): number
-
Parameters
-
envelope: MmrpEnvelope
-
Optional routingStyle: string
Returns number
Number of bytes sent
-
close
- close(): void
-
Returns void
connect
- connect(uri: string, clusterId: string, callback?: Function): void
-
Parameters
-
uri: string
-
clusterId: string
-
Optional callback: Function
Returns void
-
disconnect
- disconnect(uri: string): void
-
Parameters
-
uri: string
Returns void
-
on
- on(eventName: string, onEvent: function): void
-
Parameters
-
eventName: string
-
onEvent: function
-
- (envelope: MmrpEnvelope): void
-
Parameters
-
envelope: MmrpEnvelope
Returns void
-
-
Returns void
-
once
- once(eventName: string, onEvent: function): void
-
Parameters
-
eventName: string
-
onEvent: function
-
- (envelope: MmrpEnvelope): void
-
Parameters
-
envelope: MmrpEnvelope
Returns void
-
-
Returns void
-
relayDown
- relay
Down(uri: string): void
-
Parameters
-
uri: string
Returns void
-
relayUp
- relay
Up(uri: string, clusterId: string, callback?: Function): void
-
Parameters
-
uri: string
-
clusterId: string
-
Optional callback: Function
Returns void
-
removeAllListeners
- remove
All Listeners(eventName: string): void
-
Parameters
-
eventName: string
Returns void
-
removeListener
- remove
Listener(eventName: string, callback: Function): void
-
Parameters
-
eventName: string
-
callback: Function
Returns void
-
send
- send(envelope: MmrpEnvelope, attempts: number | null, callback: Function): number
-
Parameters
-
envelope: MmrpEnvelope
-
attempts: number | null
-
callback: Function
Returns number
Number of bytes sent
-