News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

send

Started by ecube, July 23, 2009, 05:16:28 AM

Previous topic - Next topic

ecube

in a client server app i'm workin on, something weird happened, i made 2 send calls from the client, back to back, then I had a MessageBox show on recv'd data for the server, only the server showed the data from both send calls all at once...I was under the impression 1 recv would recv data from 1 send call, not multiple?

Tedd

That's just how it works.
recv just gets the next chunk of data waiting to be read, even if that's multiple (or partial) 'messages' - however much has been queued up to that point (and will fit in your recv buffer.)
If you want to delimit, you need to do that yourself - buffer the recv'd data so you can parse out a full message at a time ("Since you could receive o", "nly part of a message. And then another.")
No snowflake in an avalanche feels responsible.