summaryrefslogtreecommitdiff
path: root/client.h
blob: c951044bcc6c17bbd1dcab5424427f71d4639f07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#include "main.h"

enum CLIENT_STATE {
    CLIENT_STATE_AWAIT_FRIENDSHIP,
    CLIENT_STATE_AWAIT_FRIEND_CONNECTED,
    CLIENT_STATE_AWAIT_PONG,
    CLIENT_STATE_AWAIT_TUNNEL,
    CLIENT_STATE_CONNECTED
};

int handle_pong_frame();
int handle_acktunnel_frame(protocol_frame *rcvd_frame);
int handle_server_tcp_frame(protocol_frame *rcvd_frame);
int handle_server_tcp_fin_frame(protocol_frame *rcvd_frame);
int do_client_loop(uint8_t *tox_id_str);