![]() |
ProvSQL C/C++ API
Adding support for provenance and uncertainty management to PostgreSQL databases
|
Framed message transport over one connected socket fd. More...
#include "kcmcp_protocol.h"
Public Member Functions | |
| Connection (int fd, uint32_t recv_max, uint32_t send_max) | |
| bool | recv (Message &out) |
| Read one logical message (concatenating MORE frames). | |
| void | send (Type type, uint32_t request_id, const std::string &payload) |
Send a message, splitting payload across MORE-flagged frames no larger than the peer's limit. | |
| void | send (Type type, uint32_t request_id) |
| int | fd () const |
Private Attributes | |
| int | fd_ |
| uint32_t | recv_max_ |
| uint32_t | send_max_ |
Framed message transport over one connected socket fd.
recv_max is the largest single-frame payload this side accepts (its advertised max_payload); send_max is the peer's accept limit, used to split outbound payloads into MORE-flagged frames. Blocking I/O.
Definition at line 103 of file kcmcp_protocol.h.
|
inline |
|
inline |
| bool kcmcp::Connection::recv | ( | Message & | out | ) |
Read one logical message (concatenating MORE frames).
Returns false on a clean peer close at a frame boundary. Throws ProtocolError on an oversize frame, std::runtime_error on an I/O error or truncation.
Definition at line 103 of file kcmcp_protocol.cpp.

|
inline |
Definition at line 116 of file kcmcp_protocol.h.


| void kcmcp::Connection::send | ( | Type | type, |
| uint32_t | request_id, | ||
| const std::string & | payload ) |
Send a message, splitting payload across MORE-flagged frames no larger than the peer's limit.
Definition at line 159 of file kcmcp_protocol.cpp.

|
private |
Definition at line 121 of file kcmcp_protocol.h.
|
private |
Definition at line 122 of file kcmcp_protocol.h.
|
private |
Definition at line 123 of file kcmcp_protocol.h.