blob: 31fe97ce62ffb803129e4b716f65d0577a5f99a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
// 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);
|