Code example for Socket

Methods: close, isClosed

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);
			}