CX Framework
Cross-platform C utility framework
Loading...
Searching...
No Matches
LogForwardHandlers Struct Reference

#include <logforward.h>

Data Fields

bool(* send )(void *ctx, const uint8 *buf, size_t len)
 
void(* close )(void *ctx)
 

Detailed Description

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.

Field Documentation

◆ close

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.

◆ send

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.


The documentation for this struct was generated from the following file: