module CrystalByteProtocol::Server(S)

Defined in:

server.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def empty? : Bool #

[View source]
def log : Log #

[View source]
def log=(log : Log) #

[View source]
def serialize(object : Message) : Bytes #

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.


[View source]