class Session::Protocol

Defined in:

models/session.cr

Constant Summary

ENDIAN = ["big"]
KLASS_NAME = [Session::Protocol]
PARTS = [{type: "enum", name: message, cls: UInt8, onlyif: nil, verify: nil, value: nil, encoding: MessageType}, {type: "string", name: ip_address, cls: String, onlyif: nil, verify: nil, length: nil, value: nil, encoding: nil}, {type: "basic", name: id_or_port, cls: UInt64, onlyif: nil, verify: nil, value: nil}, {type: "basic", name: data_size, cls: UInt32, onlyif: nil, verify: nil, value: -> do data.size end}, {type: "bytes", name: data, cls: Bytes, onlyif: nil, verify: nil, length: -> do data_size end, value: nil}] of Nil
REMAINING = [] of Nil

Class Method Summary

Instance Method Summary

Macro Summary

Class Method Detail

def self.bit_fields #

[View source]

Instance Method Detail

def __format__ : IO::ByteFormat #

[View source]
def data : Bytes #

def data=(data : Bytes) #

def data_size : UInt32 #

def data_size=(data_size : UInt32) #

def id_or_port : UInt64 #

def id_or_port=(id_or_port : UInt64) #

def ip_address : String #

def ip_address=(ip_address : String) #

def message : MessageType #

def message=(message : MessageType) #

Macro Detail

macro session_protocol(name, onlyif = nil, verify = nil, value = nil) #

[View source]