diff options
author | GDR! <gdr@go2.pl> | 2014-11-16 03:54:56 +0100 |
---|---|---|
committer | GDR! <gdr@go2.pl> | 2014-11-16 03:54:56 +0100 |
commit | c311fb3bdd2c26c347c2dd734f97003ac0538037 (patch) | |
tree | 09ec99c8722049f77b08db307e8a5388aa7cb029 /client.h | |
parent | 9b523f2b826dea54613f2eac78f754c9772841b6 (diff) |
TCP works, yay
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/client.h b/client.h new file mode 100644 index 0000000..bcbb205 --- /dev/null +++ b/client.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #include "main.h" | ||
2 | |||
3 | #define CLIENT_STATE_INITIAL 1 | ||
4 | #define CLIENT_STATE_SENTREQUEST 2 | ||
5 | #define CLIENT_STATE_REQUEST_ACCEPTED 3 | ||
6 | #define CLIENT_STATE_PING_SENT 4 | ||
7 | #define CLIENT_STATE_CONNECTED 5 | ||
8 | #define CLIENT_STATE_PONG_RECEIVED 6 | ||
9 | #define CLIENT_STATE_SEND_PING 7 | ||
10 | #define CLIENT_STATE_REQUEST_TUNNEL 8 | ||
11 | #define CLIENT_STATE_WAIT_FOR_ACKTUNNEL 9 | ||
12 | #define CLIENT_STATE_FORWARDING 10 | ||
13 | #define CLIENT_STATE_SHUTDOWN 11 | ||
14 | |||
15 | int handle_pong_frame(protocol_frame *rcvd_frame); | ||
16 | int handle_acktunnel_frame(protocol_frame *rcvd_frame); | ||
17 | int handle_server_tcp_frame(protocol_frame *rcvd_frame); | ||
18 | int do_client_loop(char *tox_id_str); | ||