Class: Cql::Protocol::ResponseFrame
- Inherits:
-
Object
- Object
- Cql::Protocol::ResponseFrame
show all
- Defined in:
- lib/cql/protocol/response_frame.rb
Defined Under Namespace
Classes: FrameBody, FrameHeaders
Instance Method Summary
collapse
Constructor Details
#initialize(buffer = ByteBuffer.new) ⇒ ResponseFrame
Returns a new instance of ResponseFrame.
6
7
8
9
|
# File 'lib/cql/protocol/response_frame.rb', line 6
def initialize(buffer=ByteBuffer.new)
@headers = FrameHeaders.new(buffer)
check_complete!
end
|
Instance Method Details
#<<(str) ⇒ Object
31
32
33
34
35
36
37
38
|
# File 'lib/cql/protocol/response_frame.rb', line 31
def <<(str)
if @body
@body << str
else
@headers << str
check_complete!
end
end
|
#body ⇒ Object
23
24
25
|
# File 'lib/cql/protocol/response_frame.rb', line 23
def body
@body.response
end
|
#body_length ⇒ Object
19
20
21
|
# File 'lib/cql/protocol/response_frame.rb', line 19
def body_length
@headers && @headers.length
end
|
#complete? ⇒ Boolean
27
28
29
|
# File 'lib/cql/protocol/response_frame.rb', line 27
def complete?
@body && @body.complete?
end
|
15
16
17
|
# File 'lib/cql/protocol/response_frame.rb', line 15
def
8
end
|
#stream_id ⇒ Object
11
12
13
|
# File 'lib/cql/protocol/response_frame.rb', line 11
def stream_id
@headers && @headers.stream_id
end
|