17#include <dfx-fdwatch/Poller.hpp>
87 virtual
void init(
std::vector<uint8_t> initialHeader) = 0;
111 virtual void write(std::vector<uint8_t> data) = 0;
Convenience macros to explicitly control copy and move semantics.
Abstract interface for FD-based event polling.
Definition Poller.hpp:37
Sink() noexcept=default
Construct a sink.
virtual void init(std::vector< uint8_t > initialHeader)=0
Initialize the sink and write the initial PCAPNG header.
FdWatch::Poller * _poller
Borrowed poller pointer for event-driven sink implementations.
Definition Sink.hpp:118
void setPoller(FdWatch::Poller *poller)
Provide a poller that the sink may use for event-driven I/O.
Definition Sink.hpp:95
DISABLE_COPY_AND_MOVE(Sink)
Sinks are not copyable and not movable.
virtual void write(std::vector< uint8_t > data)=0
Write serialized PCAPNG bytes to the sink.
Definition SocketClient.hpp:23
Definition Capture.hpp:27
std::unique_ptr< Sink > SinkPtr
Owning pointer type for sinks.
Definition Sink.hpp:122