Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface SocketWrapper

Interface for wrapping different ways of connecting to the daemon (usually node.js Sockets or browser WebSockets)

Hierarchy

  • SocketWrapper

Index

Methods

connect

  • connect(receive: (msg: string) => void, emit?: undefined | ((eventName: string, arg?: any) => void)): Promise<void>
  • This method will be called to initiate the connection

    Parameters

    • receive: (msg: string) => void

      This callback should be called when data from the daemon is received

        • (msg: string): void
        • Parameters

          • msg: string

          Returns void

    • Optional emit: undefined | ((eventName: string, arg?: any) => void)

    Returns Promise<void>

disconnect

  • disconnect(): void
  • This method will be called to disconnect

    Returns void

send

  • send(msg: string): void
  • This method will be called to send data to the daemon

    Parameters

    • msg: string

    Returns void

Generated using TypeDoc