def __init__(self, conn, stream_id=0): Stream.__init__(self, conn, stream_id) self.send_headers = list() self.request_payload_stream = DataFrameIO() self.sending = False self.is_run_app = False self.is_recv_end_header = False self.send_window_size = self.conn.send_initial_window_size self.recv_window_size = self.conn.recv_initial_window_size self.send_size = 0 self.recv_size = 0 self.push_enabled = True # default push is enabled self.app_event = None
def send_response(self, code, message=None): Stream.send_response(self, code, message) self.send_header(':status', str(code)) self.send_header(':scheme', self.scheme)
def __init__(self, conn, stream_id=0): Stream.__init__(self, conn, stream_id) self.promise = None # no push handler