int axl_stream_inspect_several ( axlStream stream,
int  chunk_num,
  ... 
)

Allows to perform several, not excluyen inspect operations, over the given stream.

Here is an example:

 if (axl_stream_inspect_several (stream,         // the stream 
                                 2,              // two chunks to recognize 
                                 "or", 2,        // first chunk and its length
                                 "||", 2) > 0) { // second chunk and its length
      // chunk matched!!
 }
Parameters:
stream The stream where the operation will be performed.
chunk_num The chunk number to inspect.
Returns:
The function returns the following values:
  • 0: if no chunk is found inside the given stream, according to the provided chunks.

  • N: is returned to denote that the Nth chunk was found.

  • -1: is returned if no more stream is left to satisfy the operation.

  • -2: means that the parameters received are wrong either because stream is NULL or any other parameter.