Data will automatically be broken up into smaller chunks when you send them. The actual size of these packets will be based upon the senders MTU value, but it should be smaller than 1600 bytes for sure. If you are worried about losing data due to all the clients sending a bunch of information at once, and your socket buffer filling up, then I can put your mind to rest. If a packet gets lost somehow, a client will automatically resend the data. This is all worked into the TCP protocol, so you dont have to worry about programming any of it yourself. Now this is of course assuming you are using TCP packets, and not UDP. If you are using UDP, then there is a possibility of losing packets (especially under a high server load).Is there anyway the clients could possibly send to much for the server to handle at once?
If TCP is the protocol being used, then they would block until the packet has been successfully sent. If necessary, the send method automatically resends the packet if it doesnt make it to it's destination. If the protocol is UDP, the function would return immediately, and you would never know for sure whether or not the packet got to its destination.or block, when they try to call send().
I agree. A thread for each client would be a better idea.I am using the Select statement, it's just that i thought maybe a thread for each client would be a better idea.