LavinMQ::WebSocketIO
Inherits IO::Buffered < IO < Reference < Object
Exposes a WebSocket as a byte stream to the AMQP and MQTT servers. Frame payloads are read straight into the caller's buffer, so a fragmented message needs no reassembly. Every frame the server sends, data, pong or close, goes through one write lock, like a client's write lock.
Constants
Constructors
Instance methods
Pings and pongs don't count as activity, the timeout is for data, like the MQTT keepalive. The socket's own timeout covers a silent connection.
Shuts down the underlying connection, see Socket#shutdown_read_write.
A close frame is sent first, unless a frame is being written: the
shutdown mustn't wait for a write to a client that stopped reading, and
a close frame in the middle of another frame would corrupt it.
Reads at most slice.size bytes from the wrapped IO into slice.
Returns the number of bytes read.
TODO: Add return type restriction Int32