#ifndef KV_SERVER_TCP #define KV_SERVER_TCP #include #include #include #include #include #include #include "channel.h" #include #include #define TCP_PORT 8085 #define LISTEN_AMOUNT 128 #define TCP_MAX_WAIT_MS 10 #define TCP_MAX_RETRIES 0 #define ADMIN_UID 0 /* val: struct tcp_channel */ extern struct hash_set channels; /* val: struct tcp_user */ extern struct hash_set users; void print_state(int); void exit_tcp(int); void tcp_loop(void); u64 spawn_channel(struct thread_loop_arg *arg); u64 spawn_channel_pool(void* arg); // TODO bool sendto_channel(size_t chid, struct kv_system_packet* packet, int wait_ack_ms, int repeat); #endif // KV_SERVER_TCP