Movie::Remote::FrameCodec
FrameCodec handles length-prefixed framing for wire protocol messages. Frame format: [4-byte length (big-endian)] [JSON payload]
Constants
MAX_FRAME_SIZE = (16 * 1024) * 1024
Maximum frame size (16 MB)
Class methods
Decodes a WireEnvelope from the IO. Returns nil on EOF or if the connection is closed. Raises on malformed frames.
Decodes an envelope from bytes (useful for testing).
Encodes a WireEnvelope to the IO with length-prefixed framing.