httpx/test/support/servlets/settings_timeout.rb
HoneyryderChuck 84db0072fb new :stream_bidi plugin
this plugin is an HTTP/2 only plugin which enables bidirectional streaming

the client can continue writing request streams as response streams arrive midway

Closes https://github.com/HoneyryderChuck/httpx/discussions/71
2025-04-04 00:21:12 +01:00

22 lines
332 B
Ruby

# frozen_string_literal: true
class SettingsTimeoutServer < TestHTTP2Server
attr_reader :frames
def initialize(**)
super
@frames = []
end
private
def handle_connection(conn, sock)
conn.on(:frame_received) do |frame|
@frames << frame
end
conn.on(:goaway) do
sock.close
end
end
end