[−][src]Struct solicit::http::connection::HttpConnectionSender
The struct represents an HttpConnection
that has been bound to a SendFrame
reference,
allowing it to send frames. It exposes convenience methods for various send operations that can
be invoked on the underlying stream. The methods prepare the appropriate frames and queue their
sending on the referenced SendFrame
instance.
The only way for clients to obtain an HttpConnectionSender
is to invoke the
HttpConnection::sender
method and provide it a reference to the SendFrame
that should be
used.
Implementations
impl<'a, S> HttpConnectionSender<'a, S> where
S: SendFrame + 'a,
[src]
S: SendFrame + 'a,
pub fn rst_stream(&mut self, id: StreamId, code: ErrorCode) -> HttpResult<()>
[src]
Send a RST_STREAM frame for the given frame id
pub fn send_settings_ack(&mut self) -> HttpResult<()>
[src]
Sends a SETTINGS acknowledge frame to the peer.
pub fn send_ping_ack(&mut self, bytes: u64) -> HttpResult<()>
[src]
Sends a PING ack
pub fn send_ping(&mut self, bytes: u64) -> HttpResult<()>
[src]
Sends a PING request
pub fn send_headers<'n, 'v, H: Into<Vec<Header<'n, 'v>>>>(
&mut self,
headers: H,
stream_id: StreamId,
end_stream: EndStream
) -> HttpResult<()>
[src]
&mut self,
headers: H,
stream_id: StreamId,
end_stream: EndStream
) -> HttpResult<()>
A helper function that inserts the frames required to send the given headers onto the
SendFrame
stream.
The HttpConnection
performs the HPACK encoding of the header block using an internal
encoder.
Parameters
headers
- a headers list that should be sent.stream_id
- the ID of the stream on which the headers will be sent. The connection performs no checks as to whether the stream is a valid identifier.end_stream
- whether the stream should be closed from the peer's side immediately after sending the headers
pub fn send_data(&mut self, chunk: DataChunk) -> HttpResult<()>
[src]
A helper function that inserts a frame representing the given data into the SendFrame
stream. In doing so, the connection's outbound flow control window is adjusted
appropriately.
pub fn send_next_data<P: DataPrioritizer>(
&mut self,
prioritizer: &mut P
) -> HttpResult<SendStatus>
[src]
&mut self,
prioritizer: &mut P
) -> HttpResult<SendStatus>
Sends the chunk of data provided by the given DataPrioritizer
.
Returns
Returns the status of the operation. If the provider does not currently have any data that
could be sent, returns SendStatus::Nothing
. If any data is sent, returns
SendStatus::Sent
.
Auto Trait Implementations
impl<'a, S> RefUnwindSafe for HttpConnectionSender<'a, S> where
S: RefUnwindSafe,
S: RefUnwindSafe,
impl<'a, S> Send for HttpConnectionSender<'a, S> where
S: Send,
S: Send,
impl<'a, S> Sync for HttpConnectionSender<'a, S> where
S: Sync,
S: Sync,
impl<'a, S> Unpin for HttpConnectionSender<'a, S>
impl<'a, S> !UnwindSafe for HttpConnectionSender<'a, S>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,