(self, payload: dict, reqtype: int = 8)
Args:
            payload: required

            # The following args only used in the first request
            reqtype: request type, always 8 
            tag: int
Args:
            payload: required
Args : payload : required
def send_packet(self, payload: dict, reqtype: int = 8):
        """
        Args:
            payload: required

            # The following args only used in the first request
            reqtype: request type, always 8 
            tag: int
        """
        body_data = plistlib.dumps(payload)
        if self._first:  # first package
            length = 16 + len(body_data)
            header = struct.pack(
                "IIII", length, 1, reqtype,
                self._tag)  # version: 1, request: 8(?), tag: 1(?)
        else:
            header = struct.pack(">I", len(body_data))
        self.sendall(header + body_data)
def send_packet ( self , payload : dict , reqtype : int = 8 ) : body_data = plistlib . dumps ( payload ) if self . _first : # first package length = 16 + len ( body_data ) header = struct . pack ( "IIII" , length , 1 , reqtype , self . _tag ) # version: 1, request: 8(?), tag: 1(?) else : header = struct . pack ( ">I" , len ( body_data ) ) self . sendall ( header + body_data )