29#ifndef PROTOCORE_SSE_H
30#define PROTOCORE_SSE_H
107int pc_sse_format(
char *buf,
size_t n,
const char *data,
const char *event,
const char *
id);
User-facing configuration for ProtoCore.
#define MAX_PATH_LEN
Maximum URL path length (including leading /).
SseConn * pc_sse_alloc(uint8_t slot_id, const char *path)
Allocate an SseConn and bind it to a TCP slot.
bool pc_sse_write(SseConn *sse, const char *data, const char *event, const char *id)
Write one SSE event record to a client.
void pc_sse_init()
Initialize all SSE pool slots to inactive.
int pc_sse_format(char *buf, size_t n, const char *data, const char *event, const char *id)
Format one SSE event record into a caller buffer (no transport).
SseConn pc_sse_pool[MAX_SSE_CONNS]
Pool of SSE connection state, one per MAX_SSE_CONNS.
void pc_sse_free(uint8_t slot_id)
Free the SseConn associated with a TCP slot.
SseConn * pc_sse_find(uint8_t slot_id)
Find the SseConn for a given TCP slot, or nullptr.
SSE connection state stored in pc_sse_pool[].
uint8_t pc_sse_id
Index into pc_sse_pool[] (set at init).
bool active
True when this entry is in use.
uint8_t slot_id
Owning TCP slot in conn_pool[].
Layer 4 (Transport) - TCP connection pool, ring buffers, and lwIP integration.