Struct sctp_proto::Stream [−][src]
pub struct Stream<'a> { /* fields omitted */ }
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 writes len(p) bytes from p with the default Payload Protocol Identifier
pub fn write_sctp(
&mut self,
p: &Bytes,
ppi: PayloadProtocolIdentifier
) -> Result<usize, Error>
pub fn write_sctp(
&mut self,
p: &Bytes,
ppi: PayloadProtocolIdentifier
) -> Result<usize, Error>
write_sctp writes len(p) bytes from p to the DTLS connection
Methods from Deref<Target = StreamState>
stream_identifier returns the Stream identifier associated to the stream.
set_default_payload_type sets the default payload type used by write.
pub fn set_reliability_params(
&mut self,
unordered: bool,
rel_type: ReliabilityType,
rel_val: u32
)
pub fn set_reliability_params(
&mut self,
unordered: bool,
rel_type: ReliabilityType,
rel_val: u32
)
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().
Trait Implementations
type Target = StreamState
type Target = StreamState
The resulting type after dereferencing.
Dereferences the value.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for Stream<'a>
impl<'a> !UnwindSafe for Stream<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more