Hi. I'm doing a chat application and I got a serious problem.

I got a server listening at the port 1001 for connection request. When a connection comes the servers creates a new index for an array of winsocks and attach the client with the new conecction.

Then problem comes when there are more than one conecction at the same time. There are a loop sending the incoming message to all clients, but only the last one get the message. The rest of the Winsock Indexes, don´t get it. Unless I close the last client connection and then the new last client sock recieves the lost messages, that I suposed to be stored in the winsock's buffer.

What can I do?

Thanxxx.