Code example for Socket

Methods: closeisConnectedisInputShutdownisOutputShutdownshutdownInputshutdownOutput

0
		return true; 
	} 
	 
	private void disconnect() { 
		try { 
			if(s != null && s.isConnected()){
				if(!s.isInputShutdown()){
					s.shutdownInput();
				} 
				if(!s.isOutputShutdown()){
					s.shutdownOutput();
				} 
				s.close();
			} 
		} catch (IOException e) {
			Log.d("EventService, disconnect", e.getMessage().toString());
		} 
	} 
} 
Connect your IDE to all the code out there  Get Codota for Java