次の方法で共有


ITransport interface

An abstraction over the behavior of transports. This is designed to support the framework and not intended for use by applications.

Properties

onclose
onreceive

Methods

connect(string, TransferFormat)
send(any)
stop()

Property Details

onclose

onclose: (error?: Error) => void | null

Property Value

(error?: Error) => void | null

onreceive

onreceive: (data: string | ArrayBuffer) => void | null

Property Value

(data: string | ArrayBuffer) => void | null

Method Details

connect(string, TransferFormat)

function connect(url: string, transferFormat: TransferFormat): Promise<void>

Parameters

url

string

transferFormat
TransferFormat

Returns

Promise<void>

send(any)

function send(data: any): Promise<void>

Parameters

data

any

Returns

Promise<void>

stop()

function stop(): Promise<void>

Returns

Promise<void>