summaryrefslogtreecommitdiff
path: root/client.h
diff options
context:
space:
mode:
authorYour Name <admin@zero.net>2025-04-30 11:53:44 +0200
committerYour Name <admin@zero.net>2025-04-30 11:53:44 +0200
commit0efd01a956e0f524f3c084548b314f40f6831441 (patch)
tree35a464f15151afa6d7b34a46d005950fa7a222b9 /client.h
base project
Diffstat (limited to 'client.h')
-rw-r--r--client.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/client.h b/client.h
new file mode 100644
index 0000000..ea19034
--- /dev/null
+++ b/client.h
@@ -0,0 +1,19 @@
+#ifndef CLIENT_H
+#define CLIENT_H
+
+#include <netinet/in.h>
+
+#define BUFFER_SIZE 512
+
+typedef struct {
+ int socket;
+ struct sockaddr_in address;
+ char username[50];
+ char room[50];
+} client_t;
+
+void *handle_client(void *arg);
+void send_to_client(int sock, const char *msg);
+void broadcast_message(const char *message, int sender_sock);
+
+#endif