diff options
Diffstat (limited to 'client.h')
-rw-r--r-- | client.h | 19 |
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 |