Chatroom in C / Socket programming in Linux
问题 I have a simple server and client C code to do a chatroom for multiclients using threads (pthread library). The problem I've been having is that I can't think a way of making the server write every message that a client sends over the socket into all other clients. I've read other similar posts in here and it was helpless. Please help me I need to do this for school. I'll send both codes right away. Server.c: #include<stdio.h> #include<string.h> //strlen #include<stdlib.h> //strlen #include