class Analogger::Protocol
- Analogger::Protocol
- Reference
- Object
Defined in:
analogger/protocol.crConstant Summary
-
MAX_MESSAGE_LENGTH =
8192
-
REGEXP_COLON =
/:/
Constructors
Instance Method Summary
-
#handle(data)
This is the key method for receiving messages and handling the protocol.
- #receive
- #send_data(data, flush_after_send = false)
Constructor Detail
Instance Method Detail
def handle(data)
#
This is the key method for receiving messages and handling the protocol. The current protocol is a very simple wire protocol. A packet of data contains an 8 byte header that encodes, in ASCII, the number of characters that are in the message as a pair of 4 digit numbers. The repeated length represents a trivial checksum on the received packet.