BOB Base
C++ base class & status codes enum for the BOB streaming protocol.
In your binding.gyp
:
"include_dirs": [
"<!(node -e \"require('bob-base')\")"
]
In your C++:
Usage
Base class
All C++ BOB interfaces must inherit from BOB::Base
and implement its virtual functions:
;
Sinks should implement BindSource
roughly as so:
BOB::Base*
Sources should implement BindSink
roughly as so:
void
Functions specific to sources or sinks may exit the program if invoked:
void
Status enum
- Send
Status::CONTINUE
as the first argument to a BOB sink'snext()
method in most cases. - Send
Status::END
as the first argument to a BOB sink'snext()
to end the stream. - Send
Status::ERROR
as the first argument to a BOB sink'snext()
if there is an error.