Struct webrtc_data::data_channel::DataChannel[][src]

pub struct DataChannel {
    pub config: Config,
    // some fields omitted
}
Expand description

DataChannel represents a data channel

Fields

config: Config

Implementations

Dial opens a data channels over SCTP

Accept is used to accept incoming data channels over SCTP

Client opens a data channel over an SCTP stream

Server accepts a data channel over an SCTP stream

Read reads a packet of len(p) bytes as binary data

ReadDataChannel reads a packet of len(p) bytes

MessagesSent returns the number of messages sent

MessagesReceived returns the number of messages received

BytesSent returns the number of bytes sent

BytesReceived returns the number of bytes received

StreamIdentifier returns the Stream identifier associated to the stream.

Write writes len(p) bytes from p as binary data

WriteDataChannel writes len(p) bytes from p

Close closes the DataChannel and the underlying SCTP stream.

BufferedAmount returns the number of bytes of data currently queued to be sent over this stream.

BufferedAmountLowThreshold returns the number of bytes of buffered outgoing data that is considered “low.” Defaults to 0.

SetBufferedAmountLowThreshold is used to update the threshold. See BufferedAmountLowThreshold().

OnBufferedAmountLow sets the callback handler which would be called when the number of bytes of outgoing data buffered is lower than the threshold.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.