Struct amy::FrameWriter [] [src]

pub struct FrameWriter { /* fields omitted */ }

Abstraction for writing frame buffered data to non-blocking sockets.

Note that an individual frame writer should only write to one socket, since it tracks whether or not the socket is writable directly.

Methods

impl FrameWriter
[src]

[src]

[src]

Write as much possible stored data to the writer, along with optional new data.

If data is not None, compute it's header and put it on the front of the pending list followed by the data, as long as the writer isn't empty. If the writer is empty, compute the header, put it in current and push the data onto the pending list.

Returns Ok(true) if the socket is still writable, and Ok(false) if it's not writable and needs to be re-registered. Returns any io::Error except for EAGAIN or EWOULDBLOCK which results in OK(false).

[src]

Tell the frame writer that the corresponding writer is writable again.

[src]

[src]

Trait Implementations

Auto Trait Implementations

impl Send for FrameWriter

impl Sync for FrameWriter