MmrpNode | mage

Hierarchy

  • MmrpNode

Index

Constructors

constructor

  • new MmrpNode(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

    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

    Returns void

once

  • once(eventName: string, onEvent: function): void
  • Parameters

    Returns void

relayDown

  • relayDown(uri: string): void
  • Parameters

    • uri: string

    Returns 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
  • Parameters

    • eventName: string

    Returns 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

    • envelope: MmrpEnvelope
    • attempts: number | null
    • callback: Function

    Returns number

    Number of bytes sent