@Override
    public void run() {
        while (true) {
            try {
                DataPacket packet = super.message_queue.take();
                Socket socket = new Socket(InetAddress.getByName(packet.getHost()), packet.getPort());
                OutputStream output = socket.getOutputStream();
                output.write(packet.getData());
                output.flush();
                output.close();
                socket.close();
                NetworkTrafficLogger.getInstance().writeSendLogToTextArea(packet);
            } catch (InterruptedException ex) {
                Logger.getLogger(TCPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            } catch (IOException ex) {
                Logger.getLogger(TCPNetworkClientImpl.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }