@Override
	public void close()
	{
		if (isNotReady()) 
		{
			return;
		}
		
		try 
		{
			onClose();
		} 
		catch (IOException e) 
		{
			// ignore
		}
		finally 
		{
			closed = true;

			if (initialized) 
			{
				protocol.releaseBuffer( buffer );
				
				for (ByteBuffer bb : bufferOut) 
				{
					protocol.releaseBuffer( bb );
				}
				
				bufferOut = null;
				buffer = null;
				inbound = null;
				outbound = null;
				initialized = false;
			}
		}
	}