Code example for UnknownHostException

Methods: getMessage

0
			byte[] messageRaw = message.getBytes();
			DatagramPacket p = new DatagramPacket(messageRaw,
					messageRaw.length, local, serverPort);
			sock.send(p);
		} catch (UnknownHostException e) {
			Log.e(TAG, "Host not known: " + e.getMessage());
		} catch (IOException e) {
			Log.e(TAG, "Error while sending: " + e.getMessage());
		} 
	} 
 
} 
 
/** 
 * Trying to come up with some generic gestures to be transmitted 
 */ 
abstract class GestureType { 
	public static final int TYPE_UP = 0;
	public static final int TYPE_RIGHT = 1;
	public static final int TYPE_DOWN = 2;
	public static final int TYPE_LEFT = 3;