Message framing and protocol parsing. Protocol GClasses sit between a
transport (C_TCP) and the application logic, translating raw bytes into
structured events.
Source: kernel/c/root-linux/src/c_prot_http_cl.c, c_prot_http_sr.c,
c_prot_tcp4h.c, c_prot_raw.c, c_websocket.c
C_PROT_HTTP_CL ¶ HTTP client protocol — sends requests and parses responses.
Can deliver the body incrementally (raw_body_data) or as a complete
message.
Property Value States ST_STOPPED, ST_DISCONNECTED, ST_WAIT_CONNECTED, ST_CONNECTEDInput events EV_SEND_MESSAGE, EV_CONNECTED, EV_DISCONNECTED, EV_RX_DATA, EV_TX_READY, EV_TIMEOUTOutput events EV_ON_MESSAGE, EV_ON_HEADER, EV_ON_OPEN, EV_ON_CLOSE
Key attributes ¶ Attribute Type Description urlstringHTTP endpoint URL. timeout_inactivityintegerInactivity timeout in seconds. cert_pemstringTLS certificate (PEM). raw_body_databoolTRUE to deliver body chunks incrementally.subscriberpointerGobj receiving output events.
C_PROT_HTTP_SR ¶ HTTP server protocol — parses incoming HTTP requests and produces
structured events for the application.
Property Value States ST_STOPPED, ST_DISCONNECTED, ST_CONNECTEDInput events EV_SEND_MESSAGE, EV_CONNECTED, EV_DISCONNECTED, EV_RX_DATA, EV_TX_READYOutput events EV_ON_MESSAGE, EV_ON_HEADER, EV_ON_OPEN, EV_ON_CLOSE
Key attributes ¶ Attribute Type Description timeout_inactivityintegerInactivity timeout in seconds. subscriberpointerGobj receiving output events.
C_PROT_TCP4H ¶ Frame protocol with a 4-byte binary header containing the payload length.
Works in both client and server modes.
Property Value States ST_STOPPED, ST_DISCONNECTED, ST_WAIT_CONNECTED, ST_WAIT_HANDSHAKE, ST_CONNECTEDInput events EV_SEND_MESSAGE, EV_CONNECTED, EV_DISCONNECTED, EV_RX_DATA, EV_TX_READY, EV_DROP, EV_TIMEOUTOutput events EV_ON_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE
Key attributes ¶ Attribute Type Description urlstringConnection URL. iamServerboolTRUE for server mode.max_pkt_sizeintegerMaximum allowed packet size. timeout_handshakeintegerHandshake timeout in seconds. timeout_payloadintegerPayload reception timeout. cert_pemstringTLS certificate (PEM).
C_PROT_RAW ¶ Raw pass-through protocol — forwards data without adding or removing
headers. Useful for transparent proxying.
Property Value States ST_STOPPED, ST_DISCONNECTED, ST_CONNECTEDInput events EV_SEND_MESSAGE, EV_CONNECTED, EV_DISCONNECTED, EV_RX_DATA, EV_TX_READYOutput events EV_ON_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE
Key attributes ¶ Attribute Type Description subscriberpointerGobj receiving output events.
C_WEBSOCKET ¶ WebSocket protocol (RFC 6455) — supports both client and server roles
with frame masking, ping/pong, and graceful close handshake.
Property Value States ST_STOPPED, ST_DISCONNECTED, ST_WAIT_CONNECTED, ST_WAIT_HANDSHAKE, ST_CONNECTEDInput events EV_SEND_MESSAGE, EV_CONNECTED, EV_DISCONNECTED, EV_RX_DATA, EV_TX_READY, EV_DROP, EV_TIMEOUTOutput events EV_ON_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE
Key attributes ¶ Attribute Type Description urlstringWebSocket URL (ws:// or wss://). iamServerboolTRUE for server mode.cert_pemstringTLS certificate (PEM). timeout_handshakeintegerHandshake timeout in seconds. timeout_payloadintegerPayload reception timeout. pingTintegerPing interval in seconds (0 = disabled).