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

Properties

close: (() => void)

Emitted when the network is closed

Type declaration

    • (): void
    • Returns void

message: ((payload) => void)

Emitted when the network adapter receives a message from a peer

Type declaration

    • (payload): void
    • Parameters

      Returns void

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

Emitted when the network adapter learns about a new peer

Type declaration

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

Emitted when the network adapter learns that a peer has disconnected

Type declaration