mirror of
https://git.robbyzambito.me/zaprus
synced 2025-12-20 16:24:50 +00:00
25 lines
652 B
C
25 lines
652 B
C
// client
|
|
|
|
int zaprus_init(void);
|
|
|
|
int zaprus_deinit(void);
|
|
|
|
int zaprus_send_relay(const char* payload, usize len, char[4] dest);
|
|
|
|
int zaprus_send_initial_connection(const char* payload, usize len, uint16_t initial_port);
|
|
|
|
struct SaprusMessage* zaprus_connect(const char* payload, usize len);
|
|
|
|
// message
|
|
struct SaprusMessage {
|
|
|
|
};
|
|
|
|
// ptr should be freed by the caller.
|
|
int zaprus_message_to_bytes(struct SaprusMessage msg, char** ptr, usize* len);
|
|
|
|
// Return value should be destroyed with zaprus_message_deinit.
|
|
struct SaprusMessage* zaprus_message_from_bytes(const char* bytes, usize len);
|
|
|
|
void zaprus_message_deinit(struct SaprusMessage* msg);
|