Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
How to send a message to multiple users in a socket programming
I'm programing a small chat ptogram using socket programing in C.
I used fork() command to make my server code can handle multiple clients connections.
Now, I want if there any way or idea to make a message arrived from a client can be sent by the server to all online client.
What I do is to create an array which holds IP addresses of all online client, but I don't now if there such a command in Unix which can send buffer variable to specified IP address.
If so, or if some one have another ideas, I hope they help me..
with best CHEERS.
0 · ·