Method: HTTP2::Stream#send
- Defined in:
- lib/http/2/stream.rb
#send(frame) ⇒ Object
Processes outgoing HTTP 2.0 frames. Data frames may be automatically split and buffered based on maximum frame size and current stream flow control window size.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/http/2/stream.rb', line 121 def send(frame) transition(frame, true) frame[:stream] ||= @id process_priority(frame) if frame[:type] == :priority case frame[:type] when :data # @remote_window is maintained in send_data send_data(frame) when :window_update @local_window += frame[:increment] emit(:frame, frame) else emit(:frame, frame) end complete_transition(frame) end |