Class: SPDY::Parser
Constant Summary
Constants included
from Protocol
SPDY::Protocol::CONTROL_BIT, SPDY::Protocol::DATA_BIT, SPDY::Protocol::VERSION
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Parser
Returns a new instance of Parser.
5
6
7
|
# File 'lib/spdy/parser.rb', line 5
def initialize
@buffer = ''
end
|
Instance Method Details
#<<(data) ⇒ Object
9
10
11
12
|
# File 'lib/spdy/parser.rb', line 9
def <<(data)
@buffer << data
try_parse
end
|
#on_body(&blk) ⇒ Object
18
19
20
|
# File 'lib/spdy/parser.rb', line 18
def on_body(&blk)
@on_body = blk
end
|
14
15
16
|
# File 'lib/spdy/parser.rb', line 14
def (&blk)
@on_headers_complete = blk
end
|
#on_message_complete(&blk) ⇒ Object
22
23
24
|
# File 'lib/spdy/parser.rb', line 22
def on_message_complete(&blk)
@on_message_complete = blk
end
|