SendDatagram

public static void send(InetAddress dst, int port, byte[] outbuf, int len) {
    try {
        DatagramPacket request = new DatagramPacket(outbuf, len, dst, port);
        DatagramSocket socket = new DatagramSocket();
        socket.send(request);
    } catch (SocketException e) {
    } catch (IOException e) {
    }
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.