Struct s2n_quic_transport::stream::AbstractStreamManager
source · pub struct AbstractStreamManager<S> { /* private fields */ }
Expand description
Manages all active Stream
s inside a connection.
AbstractStreamManager
is parameterized over the Stream
type.
Trait Implementations§
source§impl<S: Debug> Debug for AbstractStreamManager<S>
impl<S: Debug> Debug for AbstractStreamManager<S>
source§impl<S: 'static + StreamTrait> Manager for AbstractStreamManager<S>
impl<S: 'static + StreamTrait> Manager for AbstractStreamManager<S>
source§fn new(
connection_limits: &Limits,
local_endpoint_type: Type,
initial_local_limits: InitialFlowControlLimits,
initial_peer_limits: InitialFlowControlLimits,
min_rtt: Duration
) -> Self
fn new( connection_limits: &Limits, local_endpoint_type: Type, initial_local_limits: InitialFlowControlLimits, initial_peer_limits: InitialFlowControlLimits, min_rtt: Duration ) -> Self
Creates a new stream manager using the provided configuration parameters
source§fn incoming_bytes_progressed(&self) -> VarInt
fn incoming_bytes_progressed(&self) -> VarInt
The number of bytes of forward progress the peer has made on incoming streams
source§fn outgoing_bytes_progressed(&self) -> VarInt
fn outgoing_bytes_progressed(&self) -> VarInt
The number of bytes of forward progress the local endpoint has made on outgoing streams
source§fn poll_accept(
&mut self,
stream_type: Option<StreamType>,
context: &Context<'_>
) -> Poll<Result<Option<StreamId>, Error>>
fn poll_accept( &mut self, stream_type: Option<StreamType>, context: &Context<'_> ) -> Poll<Result<Option<StreamId>, Error>>
Accepts the next incoming stream of a given type
source§fn poll_open_local_stream(
&mut self,
stream_type: StreamType,
open_token: &mut OpenToken,
api_call_context: &mut ConnectionApiCallContext<'_>,
context: &Context<'_>
) -> Poll<Result<StreamId, Error>>
fn poll_open_local_stream( &mut self, stream_type: StreamType, open_token: &mut OpenToken, api_call_context: &mut ConnectionApiCallContext<'_>, context: &Context<'_> ) -> Poll<Result<StreamId, Error>>
Opens the next local initiated stream of a certain type
source§fn on_packet_ack<A: Set>(&mut self, ack_set: &A)
fn on_packet_ack<A: Set>(&mut self, ack_set: &A)
This method gets called when a packet delivery got acknowledged
source§fn on_packet_loss<A: Set>(&mut self, ack_set: &A)
fn on_packet_loss<A: Set>(&mut self, ack_set: &A)
This method gets called when a packet loss is reported
source§fn on_rtt_update(&mut self, rtt_estimator: &RttEstimator, now: Timestamp)
fn on_rtt_update(&mut self, rtt_estimator: &RttEstimator, now: Timestamp)
This method gets called when the RTT estimate is updated for the active path
source§fn on_timeout(&mut self, now: Timestamp)
fn on_timeout(&mut self, now: Timestamp)
Called when the connection timer expires
source§fn close(&mut self, error: Error)
fn close(&mut self, error: Error)
Closes the manager and resets all streams with the
given error. The current implementation will still
allow to forward frames to the contained Streams as well as to query them
for data. However new Streams can not be created.
source§fn close_reason(&self) -> Option<Error>
fn close_reason(&self) -> Option<Error>
If the manager is closed, this returns the error which which was
used to close it.
source§fn flush(&mut self, error: Error) -> Poll<()>
fn flush(&mut self, error: Error) -> Poll<()>
Closes the manager, flushes all send streams and resets all receive streams. Read more
source§fn on_transmit<W: WriteContext>(
&mut self,
context: &mut W
) -> Result<(), OnTransmitError>
fn on_transmit<W: WriteContext>( &mut self, context: &mut W ) -> Result<(), OnTransmitError>
Queries the component for any outgoing frames that need to get sent
source§fn on_data(&mut self, frame: &StreamRef<'_>) -> Result<(), Error>
fn on_data(&mut self, frame: &StreamRef<'_>) -> Result<(), Error>
This is called when a
STREAM_DATA
frame had been received for
a streamsource§fn on_data_blocked(&mut self, _frame: DataBlocked) -> Result<(), Error>
fn on_data_blocked(&mut self, _frame: DataBlocked) -> Result<(), Error>
This is called when a
DATA_BLOCKED
frame had been receivedsource§fn on_stream_data_blocked(
&mut self,
frame: &StreamDataBlocked
) -> Result<(), Error>
fn on_stream_data_blocked( &mut self, frame: &StreamDataBlocked ) -> Result<(), Error>
This is called when a
STREAM_DATA_BLOCKED
frame had been received for
a streamsource§fn on_reset_stream(&mut self, frame: &ResetStream) -> Result<(), Error>
fn on_reset_stream(&mut self, frame: &ResetStream) -> Result<(), Error>
This is called when a
RESET_STREAM
frame had been received for
a streamsource§fn on_max_stream_data(&mut self, frame: &MaxStreamData) -> Result<(), Error>
fn on_max_stream_data(&mut self, frame: &MaxStreamData) -> Result<(), Error>
This is called when a
MAX_STREAM_DATA
frame had been received for
a streamsource§fn on_stop_sending(&mut self, frame: &StopSending) -> Result<(), Error>
fn on_stop_sending(&mut self, frame: &StopSending) -> Result<(), Error>
This is called when a
STOP_SENDING
frame had been received for
a streamsource§fn on_max_data(&mut self, frame: MaxData) -> Result<(), Error>
fn on_max_data(&mut self, frame: MaxData) -> Result<(), Error>
This is called when a
MAX_DATA
frame had been receivedsource§fn on_streams_blocked(&mut self, _frame: &StreamsBlocked) -> Result<(), Error>
fn on_streams_blocked(&mut self, _frame: &StreamsBlocked) -> Result<(), Error>
This is called when a
STREAMS_BLOCKED
frame had been receivedsource§fn on_max_streams(&mut self, frame: &MaxStreams) -> Result<(), Error>
fn on_max_streams(&mut self, frame: &MaxStreams) -> Result<(), Error>
This is called when a
MAX_STREAMS
frame had been receivedfn poll_request( &mut self, stream_id: StreamId, api_call_context: &mut ConnectionApiCallContext<'_>, request: &mut Request<'_>, context: Option<&Context<'_>> ) -> Result<Response, StreamError>
source§fn has_pending_streams(&self) -> bool
fn has_pending_streams(&self) -> bool
Returns whether or not streams have data to send
source§impl<S: StreamTrait> Provider for AbstractStreamManager<S>
impl<S: StreamTrait> Provider for AbstractStreamManager<S>
fn transmission_interest<Q: Query>(&self, query: &mut Q) -> Result
fn get_transmission_interest(&self) -> Interest
fn has_transmission_interest(&self) -> bool
fn can_transmit(&self, constraint: Constraint) -> bool
source§impl<S: StreamTrait> Provider for AbstractStreamManager<S>
impl<S: StreamTrait> Provider for AbstractStreamManager<S>
source§fn timers<Q: Query>(&self, query: &mut Q) -> Result
fn timers<Q: Query>(&self, query: &mut Q) -> Result
Notifies the query of any timers owned by the provider Read more
source§fn next_expiration(&self) -> Option<Timestamp>
fn next_expiration(&self) -> Option<Timestamp>
Returns the next
Timestamp
at which the earliest timer is armed in the providersource§fn armed_timer_count(&self) -> usize
fn armed_timer_count(&self) -> usize
Counts the number of armed timers in the provider
source§fn for_each_timer<F>(&self, f: F)
fn for_each_timer<F>(&self, f: F)
Iterates over each timer in the provider and calls the provided function
impl<S> Send for AbstractStreamManager<S>
Auto Trait Implementations§
impl<S> Freeze for AbstractStreamManager<S>
impl<S> !RefUnwindSafe for AbstractStreamManager<S>
impl<S> !Sync for AbstractStreamManager<S>
impl<S> Unpin for AbstractStreamManager<S>
impl<S> !UnwindSafe for AbstractStreamManager<S>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more