doc: clarify description of streaming API

This commit is contained in:
Justin Viiret 2017-11-07 12:43:26 +11:00 committed by Xiang Wang
parent def9636d01
commit f9af9f85b2

View File

@ -33,11 +33,21 @@ See :c:type:`match_event_handler` for more information.
Streaming Mode Streaming Mode
************** **************
The streaming runtime API consists of functions to open, scan, and close The core of the Hyperscan streaming runtime API consists of functions to open,
Hyperscan data streams -- these functions being :c:func:`hs_open_stream`, scan, and close Hyperscan data streams:
:c:func:`hs_scan_stream`, and :c:func:`hs_close_stream`. Any matches detected
in the written data are returned to the calling application via a function * :c:func:`hs_open_stream`: allocates and initializes a new stream for scanning.
pointer callback.
* :c:func:`hs_scan_stream`: scans a block of data in a given stream, raising
matches as they are detected.
* :c:func:`hs_close_stream`: completes scanning of a given stream (raising any
matches that occur at the end of the stream) and frees the stream state. After
a call to :c:func:`hs_close_stream`, the stream handle is invalid and should
not be used again for any purpose.
Any matches detected in the data as it is scanned are returned to the calling
application via a function pointer callback.
The match callback function has the capability to halt scanning of the current The match callback function has the capability to halt scanning of the current
data stream by returning a non-zero value. In streaming mode, the result of data stream by returning a non-zero value. In streaming mode, the result of