public void sendData(byte[] data) {
        DatagramPacket packet = new DatagramPacket(data, data.length, ipAddress, 7171);
        try {
            socket.send(packet);
        } catch (IOException ex) {
        }
    }