def send_udp_message(self, peer_id, command, data=None):
        from solipsis.services.profile.plugin import Plugin

        message = Message(command)
        message.ip = self.public_ip
        message.port = self.public_port
        message.data = data
        if Plugin.service_api:
            log("sending udp", message)
            Plugin.service_api.SendData(peer_id, str(message))
예제 #2
0
 def wrap_message(self, command, data=None):
     message = Message(command)
     message.ip = self.ip
     message.port = self.port
     message.data = data
     return message