@Override
    public void run() {
        while (true) {
            try {
                DataPacket packet = super.message_queue.take();
                DatagramPacket datagram = new DatagramPacket(packet.getData(), packet.getData().length, InetAddress.getByName(packet.getHost()), packet.getPort());
                DatagramSocket socket = new DatagramSocket();
                socket.send(datagram);
                socket.close();
                NetworkTrafficLogger.getInstance().writeSendLogToTextArea(packet);
            } catch (InterruptedException ex) {
                Logger.getLogger(TCPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            } catch (UnknownHostException ex) {
                Logger.getLogger(UDPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            } catch (SocketException ex) {
                Logger.getLogger(UDPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(UDPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }