
Security News
npm ‘is’ Package Hijacked in Expanding Supply Chain Attack
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
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++:
#include <bob.h>
All C++ BOB interfaces must inherit from BOB::Base
and implement its virtual functions:
class My_Sink : public BOB::Base {
public:
My_Sink(<options>);
virtual ~My_Sink();
virtual BOB::Base* BindSource(BOB::Base* source);
virtual void BindSink(BOB::Base* sink);
virtual void Next(int status, void** error, char* data, size_t bytes);
virtual void Pull(void** error, char* data, size_t size);
private:
BOB::Base* source_;
};
Sinks should implement BindSource
roughly as so:
BOB::Base* My_Sink::BindSource(BOB::Base* source) {
source->BindSink(static_cast<BOB::Base*>(this));
source_ = source;
return this;
}
Sources should implement BindSink
roughly as so:
void FS_Source::BindSink(BOB::Base* sink) {
sink_ = sink;
}
Functions specific to sources or sinks may exit the program if invoked:
void My_Sink::Pull(void** error, char* data, size_t size) {
printf("Sinks do not have a public ::Pull!");
abort();
}
Status::CONTINUE
as the first argument to a BOB sink's next()
method in most cases.Status::END
as the first argument to a BOB sink's next()
to end the stream.Status::ERROR
as the first argument to a BOB sink's next()
if there is an error.FAQs
Base C++ virtual class header for the BOB streaming protocol.
The npm package bob-base receives a total of 1 weekly downloads. As such, bob-base popularity was classified as not popular.
We found that bob-base demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.
Security News
A critical flaw in the popular npm form-data package could allow HTTP parameter pollution, affecting millions of projects until patched versions are adopted.
Security News
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.