Struct websocket::client::request::Request [] [src]

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

Represents a WebSocket request.

Note that nothing is written to the internal Writer until the send() method is called.

Fields

The HTTP version of this request.

The headers of this request.

Methods

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

Creates a new client-side request.

In general Client::connect() should be used for connecting to servers. However, if the request is to be written to a different Writer, this function may be used.

Short-cut to obtain the WebSocketKey value.

Short-cut to obtain the WebSocketVersion value.

Short-cut to obtain the WebSocketProtocol value.

Short-cut to obtain the WebSocketExtensions value.

Short-cut to obtain the Origin value.

Short-cut to obtain a mutable reference to the WebSocketKey value.

Note that to add a header that does not already exist, Request.headers.set() must be used.

Short-cut to obtain a mutable reference to the WebSocketVersion value.

Note that to add a header that does not already exist, Request.headers.set() must be used.

Short-cut to obtaina mutable reference to the WebSocketProtocol value.

Note that to add a header that does not already exist, Request.headers.set() must be used.

Short-cut to obtain a mutable reference to the WebSocketExtensions value.

Note that to add a header that does not already exist, Request.headers.set() must be used.

Short-cut to obtain a mutable reference to the Origin value.

Note that to add a header that does not already exist, Request.headers.set() must be used.

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.

Return the inner Reader and Writer.

Sends the request to the server and returns a response.

Trait Implementations

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