[][src]Crate tobytcp

tobytcp is a library used when sending messages over a buffer, typically a TcpStream.

It uses length-prefixing to allow the receiver to differentiate different messages

Modules

protocol

Includes methods for generating the tobytcp prefix, or attempting to decode the length of the encoded data i.e. payload, from a buffer

Functions

send

Writes the data, encoded as tobytcp, to the Write. Returns the total number of bytes written, equal to data.len() + 8