'Send an outgoing packet.'

def send(self, out, addr=_MDNS_ADDR, port=_MDNS_PORT):

    packet = out.packet()
    try:
        while packet:
            bytes_sent = self.socket.sendto(packet, 0, (addr, port))
            if (bytes_sent < 0):
                break
            packet = packet[bytes_sent:]
    except:
        pass
