Class: Qrack::Transport::Header

Inherits:
Frame
  • Object
show all
Defined in:
lib/qrack/transport/frame08.rb

Constant Summary collapse

ID =
2

Constants inherited from Frame

Frame::FOOTER

Instance Attribute Summary

Attributes inherited from Frame

#channel, #payload

Instance Method Summary collapse

Methods inherited from Frame

#==, #id, parse, #to_binary, #to_s

Constructor Details

#initialize(payload = nil, channel = 0) ⇒ Header

Returns a new instance of Header.



84
85
86
87
88
89
# File 'lib/qrack/transport/frame08.rb', line 84

def initialize payload = nil, channel = 0
  super
  unless @payload.is_a? Protocol::Header or @payload.nil?
    @payload = Protocol::Header.new(@payload)
  end
end