コード例 #1
0
ファイル: protocol.py プロジェクト: tardyp/Xpra
 def parse_remote_caps(self, caps):
     Protocol.parse_remote_caps(self, caps)
     if LEGACY_FRAME_PER_CHUNK is None:
         may_have_bug = caps.strget("client_type", "")=="HTML5"
         self.legacy_frame_per_chunk = not caps.boolget("websocket.multi-packet", not may_have_bug)
         log("parse_remote_caps() may_have_bug=%s, legacy_frame_per_chunk=%s",
             may_have_bug, self.legacy_frame_per_chunk)
     if self.legacy_frame_per_chunk:
         log.warn("Warning: using slower legacy websocket frames")
         log.warn(" the other end is probably out of date")
         #websocker header for every chunk:
         self.make_chunk_header = self.make_wschunk_header
         #no frame header:
         self.make_frame_header = self.noframe_header
     else:
         #just the regular xpra header for each chunk:
         self.make_chunk_header = self.make_xpra_header
         #and one websocket header for all the chunks:
         self.make_frame_header = self.make_wsframe_header