Struct websocket::client::response::Response [] [src]

pub struct Response<R: Read, W: Write> {
    pub status: StatusCode,
    pub headers: Headers,
    pub version: HttpVersion,
    // some fields omitted
}

Represents a WebSocket response.

Fields

The status of the response

The headers contained in this response

The HTTP version of this response

Methods

impl<R: Read, W: Write> Response<R, W>
[src]

Reads a Response off the stream associated with a Request.

This is called by Request.send(), and does not need to be called by the user.

Short-cut to obtain the WebSocketAccept value.

Short-cut to obtain the WebSocketProtocol value.

Short-cut to obtain the WebSocketExtensions value.

Returns a reference to the inner Reader.

Returns a reference to the inner Writer.

Returns a mutable reference to the inner Reader.

Returns a mutable reference to the inner Writer.

Returns a reference to the request associated with this response.

Return the inner Reader and Writer.

Check if this response constitutes a successful handshake.

Consume this response and return a Client ready to transmit/receive data frames using the data frame type D, Sender B and Receiver C.

Does not check if the response was valid. Use validate() to ensure that the response constitutes a successful handshake.

Consume this response and return a Client ready to transmit/receive data frames.

Does not check if the response was valid. Use validate() to ensure that the response constitutes a successful handshake.

Trait Implementations

impl<R, W> Send for Response<R, W> where
    R: Read + Send,
    W: Write + Send
[src]