try {
byte [] data = message.getBytes();
InetAddress addr = InetAddress.getByName( myHost );
DatagramPacket pack =
new DatagramPacket(data, data.length, addr, myPort );
DatagramSocket ds = new DatagramSocket();
ds.send( pack );
ds.close();
} catch ( IOException e ) {
System.out.println( e ); // Error creating socket
}