コード例 #1
0
ファイル: protocol.py プロジェクト: tardyp/Xpra
 def __init__(self, *args, **kwargs):
     Protocol.__init__(self, *args, **kwargs)
     self.ws_data = b""
     self.ws_payload = []
     self.ws_payload_opcode = 0
     self.ws_mask = MASK
     self._process_read = self.parse_ws_frame
     self.legacy_frame_per_chunk = LEGACY_FRAME_PER_CHUNK in (None, True)
     self.make_chunk_header = self.make_wschunk_header
コード例 #2
0
ファイル: udp_protocol.py プロジェクト: DiGuoZhiMeng/Xpra
 def __init__(self, *args):
     Protocol.__init__(self, *args)
     self.mtu = 0
     self.last_sequence = -1  #the most recent packet sequence we processed in full
     self.highest_sequence = -1
     self.jitter = 20  #20ms
     self.uuid = 0
     self.fail_cb = {}
     self.resend_cache = {}
     self.pending_packets = {}
     self.can_skip = set()  #processed already, or cancelled
     self.cancel = set()  #tell the other end to forget those
     self.control_timer = None
     self.control_timer_due = 0
     self.asynchronous_send_enabled = False
     self.asynchronous_receive_enabled = False
     self._process_read = self.process_read
     self.enable_encoder("bencode")