Struct qp2p::SendStream
source · pub struct SendStream { /* private fields */ }
Expand description
The sending API for a QUIC stream.
Implementations§
source§impl SendStream
impl SendStream
sourcepub fn set_priority(&self, priority: i32)
pub fn set_priority(&self, priority: i32)
Set the priority of the send stream.
Every send stream has an initial priority of 0. Locally buffered data from streams with higher priority will be transmitted before data from streams with lower priority. Changing the priority of a stream with pending data may only take effect after that data has been transmitted. Using many different priority levels per connection may have a negative impact on performance.
sourcepub async fn send_user_msg(
&mut self,
user_msg_bytes: UsrMsgBytes
) -> Result<(), SendError>
pub async fn send_user_msg( &mut self, user_msg_bytes: UsrMsgBytes ) -> Result<(), SendError>
Send a message over the stream to the peer.
Messages sent over the stream will arrive at the peer in the order they were sent.