try {
Date now = new Date();
String response = now.toString() + "\r\n";
byte[] data = response.getBytes("ASCII");
DatagramPacket outgoing = new DatagramPacket(data,
data.length, packet.getAddress(), packet.getPort());
socket.send(outgoing);
}
catch (IOException ex) {
System.err.println(ex);
}