Struct sctp_proto::Stream

source ·
pub struct Stream<'a> { /* private fields */ }
Expand description

Stream represents an SCTP stream

Implementations§

read reads a packet of len(p) bytes, dropping the Payload Protocol Identifier. Returns EOF when the stream is reset or an error if the stream is closed otherwise.

read_sctp reads a packet of len(p) bytes and returns the associated Payload Protocol Identifier. Returns EOF when the stream is reset or an error if the stream is closed otherwise.

write_sctp writes len(p) bytes from p to the DTLS connection

Send data on the given stream.

Uses the deafult payload protocol (PPI).

Returns the number of bytes successfully written.

Send data on the given stream, with a specific payload protocol.

Returns the number of bytes successfully written.

write writes len(p) bytes from p with the default Payload Protocol Identifier

Send data on the given stream

Returns the number of bytes and chunks successfully written. Note that this method might also write a partial chunk. In this case it will not count this chunk as fully written. However the chunk will be advanced and contain only non-written data after the call.

stop closes the read-direction of the stream. Future calls to read are not permitted after calling stop.

finish closes the write-direction of the stream. Future calls to write are not permitted after calling Close.

stream_identifier returns the Stream identifier associated to the stream.

set_default_payload_type sets the default payload type used by write.

get_default_payload_type returns the payload type associated to the stream.

set_reliability_params sets reliability parameters for this stream.

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

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

set_buffered_amount_low_threshold is used to update the threshold. See buffered_amount_low_threshold().

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.