[][src]Struct solicit::http::connection::HttpConnectionSender

pub struct HttpConnectionSender<'a, S> where
    S: SendFrame + 'a, 
{ /* fields omitted */ }

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]

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]

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]

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

impl<'a, S> Send for HttpConnectionSender<'a, S> where
    S: Send

impl<'a, S> Sync for HttpConnectionSender<'a, S> where
    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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.