Skip to main content

OmniaPeerImpl

@totemsdk/omnia


@totemsdk/omnia / OmniaPeerImpl

Class: OmniaPeerImpl

Implements

Constructors

Constructor

new OmniaPeerImpl(stream, opts): OmniaPeerImpl

Parameters

stream

IStreamTransport

opts

OmniaPeerOptions

Returns

OmniaPeerImpl

Properties

channelId

readonly channelId: string | undefined

Implementation of

OmniaPeer.channelId


pubkey

readonly pubkey: string

Implementation of

OmniaPeer.pubkey

Methods

disconnect()

disconnect(): void

Returns

void

Implementation of

OmniaPeer.disconnect


onMessage()

onMessage(cb): Unsubscribe

Parameters

cb

(msg) => void

Returns

Unsubscribe

Implementation of

OmniaPeer.onMessage


onReconnected()

onReconnected(cb): Unsubscribe

Parameters

cb

() => void

Returns

Unsubscribe

Implementation of

OmniaPeer.onReconnected


onReconnecting()

onReconnecting(cb): Unsubscribe

Parameters

cb

(attempt) => void

Returns

Unsubscribe

Implementation of

OmniaPeer.onReconnecting


rebindStream()

rebindStream(raw): void

Parameters

raw

IStreamTransport

Returns

void


sendMessage()

sendMessage(msg): Promise<void>

Parameters

msg

OmniaMessage

Returns

Promise<void>

Implementation of

OmniaPeer.sendMessage