def _send_packet(self, sid, pkt):
        """Send a Socket.IO packet to a client."""
        encoded_packet = pkt.encode()
        if isinstance(encoded_packet, list):
            binary = False
            for ep in encoded_packet:
                self.eio.send(sid, ep, binary=binary)
                binary = True
        else:
            self.eio.send(sid, encoded_packet, binary=False)
def _send_packet ( self , sid , pkt ) : encoded_packet = pkt . encode ( ) if isinstance ( encoded_packet , list ) : binary = False for ep in encoded_packet : self . eio . send ( sid , ep , binary = binary ) binary = True else : self . eio . send ( sid , encoded_packet , binary = False )
Send a Socket.IO packet to a client.