Constructors
constructor
- new MmrpNode(role: "relay" | "client" | "both", cfg: any, clusterId: string): MmrpNode
-
Parameters
-
role: "relay" | "client" | "both"
-
cfg: any
-
clusterId: string
Methods
broadcast
- broadcast(envelope: MmrpEnvelope, routingStyle?: string): number
-
Parameters
-
-
Optional routingStyle: string
Returns number
Number of bytes sent
connect
- connect(uri: string, clusterId: string, callback?: Function): void
-
Parameters
-
uri: string
-
clusterId: string
-
Optional callback: Function
Returns void
disconnect
- disconnect(uri: string): void
on
- on(eventName: string, onEvent: function): void
-
Parameters
-
eventName: string
-
onEvent: function
Returns void
once
- once(eventName: string, onEvent: function): void
-
Parameters
-
eventName: string
-
onEvent: function
Returns void
relayDown
- relayDown(uri: string): void
relayUp
- relayUp(uri: string, clusterId: string, callback?: Function): void
-
Parameters
-
uri: string
-
clusterId: string
-
Optional callback: Function
Returns void
removeAllListeners
- removeAllListeners(eventName: string): void
removeListener
- removeListener(eventName: string, callback: Function): void
-
Parameters
-
eventName: string
-
callback: Function
Returns void
send
- send(envelope: MmrpEnvelope, attempts: number | null, callback: Function): number
-
Parameters
-
-
attempts: number | null
-
callback: Function
Returns number
Number of bytes sent
MMRP Nodes are created to transmit data encapsulated into MmrpEnvelopes across MAGE servers within a cluster
MmrpNode