

def __init__(self, client_side=True, header_encoding='utf-8'):
    self.state_machine = H2ConnectionStateMachine()
    self.streams = {
        
    }
    self.highest_inbound_stream_id = 0
    self.highest_outbound_stream_id = 0
    self.encoder = Encoder()
    self.decoder = Decoder()
    self.client_side = client_side
    self.local_settings = Settings(client=client_side, initial_values={
        MAX_CONCURRENT_STREAMS: 100,
    })
    self.remote_settings = Settings(client=(not client_side))
    self.outbound_flow_control_window = self.remote_settings.initial_window_size
    self.inbound_flow_control_window = self.local_settings.initial_window_size
    self.max_outbound_frame_size = self.remote_settings.max_frame_size
    self.max_inbound_frame_size = self.local_settings.max_frame_size
    self.header_encoding = header_encoding
    self.incoming_buffer = FrameBuffer(server=(not client_side))
    self._header_frames = []
    self._data_to_send = b''
    self._reset_streams = set()
    self._frame_dispatch_table = {
        HeadersFrame: self._receive_headers_frame,
        PushPromiseFrame: self._receive_push_promise_frame,
        SettingsFrame: self._receive_settings_frame,
        DataFrame: self._receive_data_frame,
        WindowUpdateFrame: self._receive_window_update_frame,
        PingFrame: self._receive_ping_frame,
        RstStreamFrame: self._receive_rst_stream_frame,
        PriorityFrame: self._receive_priority_frame,
        GoAwayFrame: self._receive_goaway_frame,
        ContinuationFrame: self._receive_naked_continuation,
        AltSvcFrame: self._receive_alt_svc_frame,
    }

dataset/ETHPy150Open python-hyper/hyper-h2/h2/connection.py H2Connection.__init__/original