anycall/packetprotocol.py
def send_packet(self, typename, packet):
        """
        Send a packet.
        
        :param typename: A previously registered typename.
        
        :param packet: String with the content of the packet.
        """
        typekey = typehash(typename)
        if typename != self._type_register.get(typekey, None):
            raise ValueError("Cannot send packet with unregistered type %s." % repr(typename))
        
        hdr = self._header.pack(len(packet), typekey)
        self.transport.writeSequence([hdr, packet])
def send_packet(self, typename, packet):
        """
        Send a packet.
        
        :param typename: A previously registered typename.
        
        :param packet: String with the content of the packet.
        """
        typekey = typehash(typename)
        if typename != self._type_register.get(typekey, None):
            raise ValueError("Cannot send packet with unregistered type %s." % repr(typename))
        
        hdr = self._header.pack(len(packet), typekey)
        self.transport.writeSequence([hdr, packet])
Send a packet.
        
        :param typename: A previously registered typename.
        
        :param packet: String with the content of the packet.