Class Rev::BufferedIO
In: lib/rev/buffered_io.rb
Parent: IOWatcher

A buffered I/O class witch fits into the Rev Watcher framework. It provides both an observer which reads data as it‘s received from the wire and a buffered writer which stores data and writes it out each time the socket becomes writable.

This class is primarily meant as a base class for other streams which need non-blocking writing, and is used to implement Rev‘s Socket class and its associated subclasses.

Methods

Classes and Modules

Class Rev::BufferedIO::Writer

Constants

INPUT_SIZE = 16384   Maximum number of bytes to consume at once

Public Class methods

Public Instance methods

Close the BufferedIO stream

Is the IO object closed?

Called whenever the IO object hits EOF

Called whenever the IO object receives data

Called whenever a write completes and the output buffer is empty

Number of bytes are currently in the output buffer

Write data in a buffered, non-blocking manner

Protected Instance methods

Buffered writer

Inherited callback from IOWatcher

Wrapper for handling reset connections and EAGAIN

Attempt to write the contents of the output buffer

[Validate]