Fundamentals question, is this how it works?



Hey

With a tcp stream socket what happens when it is reading say 4000bytes and
495 bytes come in?

I am finding when i add a delay in my reading i always read my data
correctly. If i let it run at full speed it gets stuck. I am using
asynchornous sockets.

On my understanding is this right, say i have a receive buffer of 1024 bytes
and i send 2048 bytes, then straight after i send 400 bytes:

1) Client receives 1024 bytes of data from original 2048 sent, and processes
it
2)After client reads all the data it receives the next 1024 bytes, and
processes it
3) then it reads the first 400 bytes and processes it.

Am i right in that it queues up that way? And why if i slow down the reading
does it become reliable but if i let it read at full speed it gets stuck.
When i say stuck i mean it ignores new data coming in. So it does this, but
this is accurate to my real situation

1) Reads 425 bytes
2) now no longer reads any new data

Is it possible it is trying to read too quick? since it is in a loop anyway
surely it has to finish reading the first before it can continue anyhow?




.



Relevant Pages

  • HP Printer vs. XP Computer
    ... after I deleted the print job it kept printing! ... However, when I tried to print an email message, the paper got stuck in the ... I'm emailing HP again, but after reading of everyone else's problems here, ...
    (microsoft.public.windowsxp.newusers)
  • Re: HP Printer vs. XP Computer
    ... It printed gibberish, the paper got stuck, and ... > even after I deleted the print job it kept printing! ... > However, when I tried to print an email message, the paper got stuck in ... > I'm emailing HP again, but after reading of everyone else's problems here, ...
    (microsoft.public.windowsxp.newusers)
  • RE: HP Printer vs. XP Computer
    ... "Lois G." wrote: ... It printed gibberish, the paper got stuck, and even ... > after I deleted the print job it kept printing! ... > I'm emailing HP again, but after reading of everyone else's problems here, ...
    (microsoft.public.windowsxp.newusers)
  • Re: A last-ditch effort to save my Wireless card-
    ... First- thanks for reading this. ... I am stuck. ... HP Pavillion laptop, XP, Broadcom Wireless internal. ... cache, 4] Prayed to the computer god, 5} uninstalled and re-installed ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Blocking behaviour when calling mmioClose
    ... Yes, this is for reading. ... > don't see any delay on mmioClose. ... > Assuming somehow we haven't ascended correctly, ... > Grant Schenck Software ...
    (microsoft.public.win32.programmer.mmedia)