how to send data to multiple clients from single server mfc or winsock
-
hi, how to send data to multiple clients from single server.i can send data to single clients but how to handle multiple client. can any one provide code for that part.
sravanthi
In main thread you listen for client connections. Once you got a client connection, you can create a corresponding socket and thread.Then all the communication can be handled in that thread using that socket. Of course, if there are too many client to deal with, this is not a good way. You can use iocp instead.
-
hi, how to send data to multiple clients from single server.i can send data to single clients but how to handle multiple client. can any one provide code for that part.
sravanthi
You can use multicasting for this - http://en.wikipedia.org/wiki/Multicast[^]
«_Superman_» I love work. It gives me something to do between weekends.
Microsoft MVP (Visual C++) -
In main thread you listen for client connections. Once you got a client connection, you can create a corresponding socket and thread.Then all the communication can be handled in that thread using that socket. Of course, if there are too many client to deal with, this is not a good way. You can use iocp instead.