Click here to Skip to main content
12,998,363 members (56,459 online)
Rate this:
Please Sign up or sign in to vote.
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 11-Apr-13 21:45pm
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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 12 Apr 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100