Code example for Socket

Methods: closeisClosed

0
			pDatagramSocket.close();
		} 
	} 
 
	public static void closeSocket(final Socket pSocket) {
		if(pSocket != null && !pSocket.isClosed()) {
			try { 
				pSocket.close();
			} catch (final IOException e) {
				Debug.e(e);
			} 
		} 
	} 
 
	public static void closeSocket(final ServerSocket pServerSocket) {
		if(pServerSocket != null && !pServerSocket.isClosed()) {
			try { 
				pServerSocket.close();
			} catch (final IOException e) {
				Debug.e(e);
Stop searching for code, let great code find you!  Add Codota to your java IDE