|
CX Framework
Cross-platform C utility framework
|
#include <logforward.h>
Data Fields | |
| bool(* | send )(void *ctx, const uint8 *buf, size_t len) |
| void(* | close )(void *ctx) |
What a forwarder needs from your transport
The table is borrowed, not copied, so it must outlive the forwarder. A static const one is the usual shape.
Definition at line 91 of file logforward.h.
| void(* LogForwardHandlers::close) (void *ctx) |
Called once when the forwarder is unregistered; optional
Must not log: it can run with the log system's configuration lock held.
Definition at line 106 of file logforward.h.
| bool(* LogForwardHandlers::send) (void *ctx, const uint8 *buf, size_t len) |
Hand a run of complete frames to the transport
Never called with part of a frame. Return false for "not now": cx spools this run and everything after it until logForwardResume(). Returning true means the transport has taken all of it.
Called on the remote drain thread, and from logForwardResume(), logForwardConnected() and logForwardDisconnected() on whichever thread called those. Anything logged inside it stays on this machine.
Definition at line 101 of file logforward.h.