private void sendData(Message message) {
        if (message != null) {
            Node node = mConfigParser.getConfiguration(message.getDest());
            // Socket socket = mConnectionPool.openSocket(node);
            SocketChannel socketChannel = null;
            ObjectOutputStream oos = null;
            try {
                SocketAddress socketAddress = new InetSocketAddress(
                        node.getIp(), node.getPort());
                socketChannel = SocketChannel.open();
                socketChannel.connect(socketAddress);
                // oos = new ObjectOutputStream(socket.getOutputStream());
                // oos.writeObject(message);
                // oos.flush();
                byte[] bytes = serialize(message);
                ByteBuffer buffer = ByteBuffer.wrap(bytes);
                socketChannel.write(buffer);
                trasferDelayedMessage(mSendQueue, mDelayedMessageQueue);
            } catch (IOException e) {
                e.printStackTrace();
            } finally {
                try {
                    if (oos != null) {
                        oos.close();
                    }
                    if (socketChannel != null) {
                        socketChannel.close();
                    }
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }