Struct framed::Sender
[−]
[src]
pub struct Sender<W: Write> { /* fields omitted */ }
Sends encoded frames over an inner io::Write
instance.
Methods
impl<W: Write> Sender<W>
[src]
fn new(w: W) -> Sender<W>
[src]
Construct a Sender
that sends frames over the supplied
io::Write
.
fn into_inner(self) -> W
[src]
Consume this Sender
and return the inner io::Write
.
fn flush(&mut self) -> Result<()>
[src]
Flush all buffered data. Includes calling flush
on the inner
writer.
fn queue(&mut self, p: &Payload) -> Result<usize>
[src]
Queue the supplied payload for transmission.
This Sender
may buffer the data indefinitely, as may the
inner writer. To ensure all buffered data has been
transmitted call flush
.
See also: send
fn send(&mut self, p: &Payload) -> Result<usize>
[src]
Encode the supplied payload as a frame, write it to the inner writer, then flush.
Ensures the data has been transmitted before returning to the caller.
See also: queue