interface NetworkAdapterEvents {
    close: (() => void);
    message: ((payload) => void);
    peer-candidate: ((payload) => void);
    peer-disconnected: ((payload) => void);
    ready: ((payload) => void);
}

Properties

close: (() => void)

Emitted when the network is closed

Type declaration

    • (): void
    • Emitted when the network is closed

      Returns void

message: ((payload) => void)

Emitted when the network adapter receives a message from a peer

Type declaration

    • (payload): void
    • Emitted when the network adapter receives a message from a peer

      Parameters

      Returns void

peer-candidate: ((payload) => void)

Emitted when the network adapter learns about a new peer

Type declaration

    • (payload): void
    • Emitted when the network adapter learns about a new peer

      Parameters

      Returns void

peer-disconnected: ((payload) => void)

Emitted when the network adapter learns that a peer has disconnected

Type declaration

    • (payload): void
    • Emitted when the network adapter learns that a peer has disconnected

      Parameters

      Returns void

ready: ((payload) => void)

Emitted when the network is ready to be used

Type declaration

    • (payload): void
    • Emitted when the network is ready to be used

      Parameters

      Returns void

Generated using TypeDoc