Code example for DatagramSocket

Methods: close, isConnected

0
	} 
 
	@Override 
	protected void onStop() { 
		if (mSocket != null)
			if (mSocket.isConnected())							
				mSocket.close();
		super.onStop(); 
	} 
 
	// used to convert wifi ip address 
	String formatIp(int ipAddress) {
		int intMyIp3 = ipAddress / 0x1000000;
		int intMyIp3mod = ipAddress % 0x1000000;
 
		int intMyIp2 = intMyIp3mod / 0x10000;
		int intMyIp2mod = intMyIp3mod % 0x10000;
 
		int intMyIp1 = intMyIp2mod / 0x100;
		int intMyIp0 = intMyIp2mod % 0x100;