Good Day,
I'm developing an application in VC++ that communicates using UDP protocol with winsock on Windows XP. Previously I've been able to assume that all packets being received by the tool were from a single target. However I'm now doing a broadcast receive. The listening thread has minimal overhead and should spend all of its time on the below line:
rv = recvfrom(socket,
p_buffer_p,
p_size,
0,
(sockaddr*)&clientService_in, //This is set to do a broadcast recv
&SenderAddrSize);
My question is whether or not I can assume that a buffer that I get from a single return from recvfrom is from a single target. That is, does 1 call to send in the sending app equal 1 return from recvfrom in the receiving app? Or can multiple sends from multiple senders get mushed together into 1?
I'm assuming that a single send from a target can't get split up into multiple returns from recvfrom. I've always assumed this and never had a problem anyway.
One more thing, its a SOCK_DGRAM type of socket.