Class: Biryani::Frame::Unknown
- Inherits:
-
Object
- Object
- Biryani::Frame::Unknown
- Defined in:
- lib/biryani/frame/unknown.rb
Instance Attribute Summary collapse
-
#f_type ⇒ Object
readonly
Returns the value of attribute f_type.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#stream_id ⇒ Object
readonly
Returns the value of attribute stream_id.
Instance Method Summary collapse
-
#initialize(f_type, flags, stream_id, payload) ⇒ Unknown
constructor
A new instance of Unknown.
- #length ⇒ Integer
- #to_binary_s ⇒ String
Constructor Details
#initialize(f_type, flags, stream_id, payload) ⇒ Unknown
Returns a new instance of Unknown.
10 11 12 13 14 15 |
# File 'lib/biryani/frame/unknown.rb', line 10 def initialize(f_type, flags, stream_id, payload) @f_type = f_type @flags = flags @stream_id = stream_id @payload = payload end |
Instance Attribute Details
#f_type ⇒ Object (readonly)
Returns the value of attribute f_type.
4 5 6 |
# File 'lib/biryani/frame/unknown.rb', line 4 def f_type @f_type end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
4 5 6 |
# File 'lib/biryani/frame/unknown.rb', line 4 def flags @flags end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
4 5 6 |
# File 'lib/biryani/frame/unknown.rb', line 4 def payload @payload end |
#stream_id ⇒ Object (readonly)
Returns the value of attribute stream_id.
4 5 6 |
# File 'lib/biryani/frame/unknown.rb', line 4 def stream_id @stream_id end |
Instance Method Details
#length ⇒ Integer
18 19 20 |
# File 'lib/biryani/frame/unknown.rb', line 18 def length @payload.bytesize end |
#to_binary_s ⇒ String
23 24 25 |
# File 'lib/biryani/frame/unknown.rb', line 23 def to_binary_s Frame.to_binary_s_header(length, @f_type, @flags, @stream_id) + @payload end |