module CrystalByteProtocol::Server(S)
Defined in:
server.crConstructors
Instance Method Summary
- #empty? : Bool
- #log : Log
- #log=(log : Log)
-
#serialize(object : Message) : Bytes
Serializes the
Message
toBytes
.
Constructor Detail
Instance Method Detail
Serializes the Message
to Bytes
.
The bytes are a view of a buffer. If the method is called again, the buffer will change, and the bytes too.
Use #dup
to copy and avoid the side effect. Another solution is to use a pool.