protected boolean readBuffer(ByteBuffer buffer)
	{
	    int result = onReadPacketHeader( buffer ); 
	    
	    if (result == ON_READ_REWIND)
	    {
	        unflip( buffer );
	        
	        return false;
	    }
	    else if (result == ON_READ_CLOSE)
	    {
	        close();
            
            return false;
	    }
	    
		int finalPosition = buffer.position() + result;
		
		while (!closed && buffer.position() < finalPosition)
		{
			int interfaceId = Compress.getIntUnsigned( buffer );
			int methodId = Compress.getIntUnsigned( buffer );
			
			try
			{
				RemoteMethodEntry entry = protocol.getEntry( interfaceId, methodId );
				Object[] arguments = entry.reflectMethod.get( buffer );
				
			    handleInvocation( entry, arguments );    
			}
			catch (Exception e)
			{
				throw new RuntimeException( e );
			}
		}
		
		return true;
	}