Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ApiInterfaceProps

Hierarchy

  • ApiInterfaceProps

Index

Properties

apiName

apiName: string

Name of the API implemented by this object. This must be in the form @.

Optional handlers

handlers: {}

Message type handlers for incoming messages. If an incoming message is received of a type that is not present in this list, it will be discarded.

The handler for each message type must return the parameters that it wants to reply to the sender with. If

Type declaration

Optional implementation

implementation: boolean

If this is true, this object is the singleton implementation of the interface.

default

false

Optional onConnect

onConnect: (peer: EndpointAddr) => void

Called when the API interface connects.

Type declaration

    • (peer: EndpointAddr): void
    • Parameters

      • peer: EndpointAddr

      Returns void

Optional onDisconnect

onDisconnect: (peer: EndpointAddr) => void

Called when the API interface disconnects.

Type declaration

    • (peer: EndpointAddr): void
    • Parameters

      • peer: EndpointAddr

      Returns void

Generated using TypeDoc