[RESOLVED] Winsock send() question
i am working on a send/recieve file application... im sending the file piece by piece (7000 bytes every time) using Asynchronous Sockets through a loop
my problem is this:
some times , arbitrary , the server will not recieve the whole package the client sends(the 7000 bytes) but it will recieve it in 2 chunks ( ex. first 1500 bytes then 5500 bytes).
is this a winsock problem or a bug in my code?
i can provide any specific code if it helps
thanks
Re: Winsock send() question
it is not a winsock problem, it is how socket was designed to work.
If the sender sends 7000 bytes then the receiver may receive is in one packet of 7000 bytes and may receive 7000 packets of 1 byte and may receive any other number of packets (between 1 and 7000).
Re: Winsock send() question
ah ok i understand that now....
another question i have releated to this:
lets say my client sends Simultaneously 2 files (2 threads sending) to the server
the client calls the send() function with a package of 7000 bytes
my question is, if the server recieves the packages in multiple chunks and not as one , will the recv() get the pieces of the same package in an order or they could be messed with the other send() thread packages?
Re: Winsock send() question
Re: Winsock send() question