Struct websocket_stream::WebsocketStream [] [src]

pub struct WebsocketStream { /* fields omitted */ }

RFC-6455 Protocol stream

Methods

impl WebsocketStream
[src]

Attempts to create a new stream in specified mode

Sets the socket to the specified mode

Attempts to read data from the socket.

If stream is in Mode::Block, this will block forever until data is received

If socket is in Mode::NonBlock and data is available, it will read until a complete message is received. If the buffer has run out, and it is still waiting on the remaining payload, it will adjust the remaining needed in it's buffer and will adjust on the next call to this function.

Attempts to write data to the socket

Trait Implementations

impl Clone for WebsocketStream
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more