From 0cd383b2c444936dc2290c850c02a0cae11187cd Mon Sep 17 00:00:00 2001 From: justanothercatgirl Date: Sun, 30 Jun 2024 23:54:36 +0300 Subject: Updated C headers library --- server/channel.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'server/channel.h') diff --git a/server/channel.h b/server/channel.h index 4943887..3916212 100644 --- a/server/channel.h +++ b/server/channel.h @@ -10,6 +10,19 @@ #include +struct user { + long id; + unsigned int ip; + unsigned short port; + unsigned long last_keepalive; +}; +int __user_cmp(const void* a, const void* b); + +struct channel_handle { + int sockfd; + struct user* users; +}; + // main function that manages every channel void thread_loop(void); @@ -17,7 +30,7 @@ struct channel_handle *channel_init(void); void channel_uninit(struct channel_handle *handle); void send_packets_back(struct kv_packet** packets, struct channel_handle *handle); -void handle_system_packet(struct kv_packet* packet, struct channel_handle* handle); +void handle_system_packet(struct kv_packet* packet, struct sockaddr_in *source, struct channel_handle* handle); void clear_packet_array(struct kv_packet **array); -- cgit v1.2.3-70-g09d2