Click here to Skip to main content
15,879,096 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
I have developed a udp server/client application in which server has one socket at which it continuously receives data from 40 clients. Now I want to know that what happens if all of the 40 Clients send data at a time? According to my understanding, data must be queued in receive buffer and next time when I call recvfrom() the data queued in the buffer is received i.e. I shall have to call recvfrom() 40 times to receive data of all the 40 Clients even if all the Clients sent data simultaneously. Also, I want to know that all of the data of 40 Clients will be queued in receive buffer or some of the data will be discarded too? Also, what is the maximum buffer size in which data can be queued in receive buffer and after what limit is data dropped?
Posted
Comments
Richard MacCutchan 12-Apr-13 4:10am    
If you are using UDP then some of the messages may be lost. You should always use TCP for this type of application, or implement your own protocol to ensure you do not lose messages.
ayesha hassan 12-Apr-13 5:38am    
if data arrives from 40 clients at a socket, it will be buffered in socket buffer right? and each call to recvfrom() will read data from socket buffer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900