try {
byte [] data = message.getBytes("UTF-8");
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
}