Code example for SocketException

Methods: printStackTrace

0
	private VrpnClient() { 
		try { 
			_socket = new DatagramSocket();
		} catch (SocketException e) {
			// Check this device IP network configuration 
			e.printStackTrace();
		} 
 
		/* 
		 * There is a single _packet instance to avoid numerous object creation 
		 * in onSensorChanged() 
		 */ 
		byte dummy[] = { 0 };
		_packet = new DatagramPacket(dummy, dummy.length);
 
		// Set the address with anything since _sendObject will be called before 
		// setUri has been called // why 
		try { 
			_packet.setAddress(InetAddress.getLocalHost());
		} catch (UnknownHostException e) {
		}