Code example for Socket

Methods: close, shutdownInput, shutdownOutput

0
		 * Cancel the current operation 
		 */ 
		public void cancel() { 
			if (mmSocket != null) {
				try { 
					mmSocket.shutdownOutput();
					mmSocket.shutdownInput();
					mmSocket.close();
				} catch (IOException e) {
					Log.e(TAG, "close() of connect socket failed", e);
				} 
			} 
		} 
	} 
}