Updated: October 28, 2024 |
#include <aoi.h> int64_t (*Sniff)(void *ctx, void *buf, int64_t num);
This function should sniff (i.e., nondestructively read) num bytes of data at the beginning of the stream. All streamers should implement this function. After any stream data are read with Read(), you can no longer use Sniff().
The number of bytes successfully sniffed from the stream, or -1 if we're not at the beginning of the stream.