Struct tungstenite::protocol::frame::FrameSocket[][src]

pub struct FrameSocket<Stream> { /* fields omitted */ }

A reader and writer for WebSocket frames.

Methods

impl<Stream> FrameSocket<Stream>
[src]

Create a new frame socket.

Create a new frame socket from partially read data.

Extract a stream from the socket.

Important traits for &'a mut W

Returns a shared reference to the inner stream.

Important traits for &'a mut W

Returns a mutable reference to the inner stream.

impl<Stream> FrameSocket<Stream> where
    Stream: Read
[src]

Read a frame from stream.

impl<Stream> FrameSocket<Stream> where
    Stream: Write
[src]

Write a frame to stream.

This function guarantees that the frame is queued regardless of any errors. There is no need to resend the frame. In order to handle WouldBlock or Incomplete, call write_pending() afterwards.

Complete pending write, if any.

Trait Implementations

impl<Stream: Debug> Debug for FrameSocket<Stream>
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<Stream> Send for FrameSocket<Stream> where
    Stream: Send

impl<Stream> Sync for FrameSocket<Stream> where
    Stream: Sync