Struct ws::Response[][src]

pub struct Response { /* fields omitted */ }

The handshake response.

Methods

impl Response
[src]

Construct a generic HTTP response with a body.

Important traits for &'a [u8]

Get the response body.

Edit the value of the first instance of an HTTP header.

Important traits for Vec<u8>

Access the request headers.

Important traits for Vec<u8>

Edit the request headers.

Get the HTTP status code.

Set the HTTP status code.

Get the HTTP status reason.

Set the HTTP status reason.

Get the hashed WebSocket key.

Get the protocol that the server has decided to use.

Set the protocol that the server has decided to use.

Get the extensions that the server has decided to use. If these are unacceptable, it is appropriate to send an Extension close code.

Add an accepted extension to this response. This may result in duplicate extensions listed.

Remove an accepted extension from this response. This will remove all configurations of the extension.

Attempt to parse an HTTP response from a buffer. If the buffer does not contain a complete response, thiw will return Ok(None).

Construct a new WebSocket handshake HTTP response from a request. This will create a response that ignores protocols and extensions. Edit this response to accept a protocol and extensions as necessary.

Write a response out to a buffer

Trait Implementations

impl Debug for Response
[src]

Formats the value using the given formatter. Read more

impl Display for Response
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Response

impl Sync for Response