Code example for SocketChannel

Methods: close

0
	} 
	 
	public void closeClient() { 
		if( mClientSocketChannel != null ){
			try{ 
				mClientSocketChannel.close();
				mClientSelector.close();
			}catch(Exception e){
				 
			}finally{ 
				mClientSocketChannel = null;
				mClientSelector = null;
				mClientAddr = null;
			} 
		} 
	} 
	 
	/** 
	 * read out -1, connection broken, remove it from clients collection 
	 */ 
	public void onBrokenConn(SocketChannel schannel){