27#ifndef PROTOCORE_RELAY_H
28#define PROTOCORE_RELAY_H
38enum class pc_relay_status : int32_t
50using pc_relay_recv_fn = int (*)(
void *ctx, uint8_t *buf,
size_t cap);
57using pc_relay_send_fn = int (*)(
void *ctx,
const uint8_t *buf,
size_t len);
60using pc_relay_shutdown_fn = void (*)(
void *ctx);
65 pc_relay_recv_fn recv;
66 pc_relay_send_fn send;
67 pc_relay_shutdown_fn shutdown;
96void pc_relay_init(pc_relay *r,
const pc_relay_end *client,
const pc_relay_end *origin);
102pc_relay_status pc_relay_step(pc_relay *r);
115void pc_relay_note_eof(pc_relay *r,
bool origin);
User-facing configuration for ProtoCore.
#define PC_RELAY_BUF
Per-direction relay buffer size (bytes) for services/net/relay (PC_ENABLE_RELAY).