interface ConnectionI {
    close: (() => PromiseVow<void>);
    getLocalAddress: (() => string);
    getRemoteAddress: (() => string);
    send: ((packetBytes, opts?) => PromiseVow<string>);
}

Properties

close: (() => PromiseVow<void>)

Close both ends of the connection

Type declaration

    • (): PromiseVow<void>
    • Returns PromiseVow<void>

getLocalAddress: (() => string)

Get the locally bound name of this connection

Type declaration

    • (): string
    • Returns string

getRemoteAddress: (() => string)

Get the name of the counterparty

Type declaration

    • (): string
    • Returns string

send: ((packetBytes, opts?) => PromiseVow<string>)

Send a packet on the connection

Type declaration

    • (packetBytes, opts?): PromiseVow<string>
    • Parameters

      • packetBytes: string
      • Optional opts: Record<string, any>

      Returns PromiseVow<string>