Class: Baykit::BayServer::Docker::Http::H2::H2WarpHandler
- Inherits:
-
H2ProtocolHandler
- Object
- Protocol::ProtocolHandler
- H2ProtocolHandler
- Baykit::BayServer::Docker::Http::H2::H2WarpHandler
show all
- Includes:
- Agent, Common::WarpHandler, Protocol
- Defined in:
- lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb
Defined Under Namespace
Classes: WarpProtocolHandlerFactory
Constant Summary
Baykit::BayServer::Docker::Http::H2::H2ProtocolHandler::CTL_STREAM_ID
Instance Attribute Summary collapse
Instance Method Summary
collapse
#max_req_packet_data_size, #max_res_packet_data_size, #protocol
Constructor Details
Returns a new instance of H2WarpHandler.
26
27
28
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 26
def initialize(pkt_store)
super(pkt_store, false)
end
|
Instance Attribute Details
#analyzer ⇒ Object
Returns the value of attribute analyzer.
23
24
25
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 23
def analyzer
@analyzer
end
|
#cur_stream_id ⇒ Object
Returns the value of attribute cur_stream_id.
24
25
26
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 24
def cur_stream_id
@cur_stream_id
end
|
Instance Method Details
#end_req_contents(tur) ⇒ Object
57
58
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 57
def end_req_contents(tur)
end
|
#handle_data(cmd) ⇒ Object
73
74
75
76
77
78
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 73
def handle_data(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_data: stm=#{cmd.stream_id} len=#{cmd.length}")
end
raise Sink.new("Illegal State")
end
|
#handle_go_away(cmd) ⇒ Object
109
110
111
112
113
114
115
116
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 109
def handle_go_away(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_go_away: last_stm=#{cmd.last_stream_id} code=#{cmd.error_code} " +
"desc=#{H2ErrorCode.msg.get_message(cmd.error_code.to_i)} " +
"debug=#{cmd.debug_data}")
end
return NextSocketAction::CLOSE
end
|
#handle_headers(cmd) ⇒ Object
80
81
82
83
84
85
86
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 80
def handle_headers(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_headers: stm=#{cmd.stream_id} dep=#{cmd.stream_dependency} weight=#{cmd.weight}")
end
raise Sink.new("Illegal State")
end
|
#handle_ping(cmd) ⇒ Object
118
119
120
121
122
123
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 118
def handle_ping(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_ping: stm=#{cmd.stream_id}")
end
raise Sink.new("Illegal State")
end
|
#handle_preface(cmd) ⇒ Object
Implements H2CommandHandler
66
67
68
69
70
71
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 66
def handle_preface(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_preface: proto=#{cmd.protocol}")
end
raise Sink.new("Illegal State")
end
|
#handle_priority(cmd) ⇒ Object
88
89
90
91
92
93
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 88
def handle_priority(cmd)
if BayLog.debug_mode?
BayLog.debug("#{@ship} handle_priority: stmid=#{cmd.stream_id} dep=#{cmd.stream_dependency} weight=#{cmd.weight}")
end
raise Sink.new("Illegal State")
end
|
#handle_rst_stream(cmd) ⇒ Object
125
126
127
128
129
130
131
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 125
def handle_rst_stream(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_rst_stream: stm=#{cmd.stream_id} code=#{cmd.error_code} " +
"desc=#{H2ErrorCode.msg.get_message(cmd.error_code.to_i)} ")
end
return NextSocketAction::CLOSE
end
|
#handle_settings(cmd) ⇒ Object
95
96
97
98
99
100
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 95
def handle_settings(cmd)
if BayLog.debug_mode?
BayLog.debug("#{@ship} handle_settings: stmid=#{cmd.stream_id}")
end
raise Sink.new("Illegal State")
end
|
#handle_window_update(cmd) ⇒ Object
102
103
104
105
106
107
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 102
def handle_window_update(cmd)
if BayLog.debug_mode?
BayLog.debug("#{ship} handle_window_update: stmid=#{cmd.stream_id} size=#{cmd.window_size_increment}")
end
raise Sink.new("Illegal State")
end
|
#new_warp_data(warp_id) ⇒ Object
46
47
48
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 46
def new_warp_data(warp_id)
return WarpData.new(ship, warp_id)
end
|
#next_warp_id ⇒ Object
42
43
44
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 42
def next_warp_id
return H1WarpHandler::FIXED_WARP_ID
end
|
51
52
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 51
def (tur)
end
|
#reset ⇒ Object
34
35
36
37
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 34
def reset()
super
@cur_stream_id = 1
end
|
#send_req_contents(tur, buf, start, len) ⇒ Object
54
55
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 54
def send_req_contents(tur, buf, start, len)
end
|
#to_s ⇒ Object
133
134
135
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 133
def to_s
ship.to_s
end
|
#verify_protocol(proto) ⇒ Object
60
61
|
# File 'lib/baykit/bayserver/docker/http/h2/h2_warp_handler.rb', line 60
def verify_protocol(proto)
end
|