Re: CSocket problem

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Riverwind (riverwind_at_heaven-dk.NEJ_TIL_SPAM)
Date: 06/10/04


Date: Fri, 11 Jun 2004 00:05:06 +0200


"Joseph M. Newcomer" <newcomer@flounder.com> skrev i en meddelelse
news:933hc0pgkiofrbevdpd3b086735lo3inoa@4ax.com...
> You have confused "message" with "stream". A byte stream means exactly
that: you get a
> stream of bytes. The amount you receive in a given receive call has
nothing to do with the
> number that were sent by a send call. It is ALWAYS legitimate for a
receive call to return
> you fewer bytes than a send call; you must do multiple receive calls to
get the data you
> want.
>
> The only guarantee TCP gives you is that eventually, through a sequence of
receive
> operations, you will receive every byte that was sent, in order, with no
duplicates and no
> drops, or both the sender and the receiver will get an error code
indicating this could
> not be done. Otherwise, there are no promises. You have assumed that if
you send, say, 8K
> bytes, your receive will receive 8K bytes. This is extremely unlikely.
>
> You will have to put in some form of message delimiter, byte count, or
something else, if
> you want to impose some concept of :"message" on the byte stream. TCP has
no concept of
> messages, and has no responsibility to deliver other than what it
promises.
> joe

Maybe I was a bit vague in describing the problem, but the application does
interpret the byte stream as messages, through a count, which tells me
exactly how long the message is, so basically I have no problem with
messages split over several calls to Receive(..). I will have to check the
sender code to see if it handles the WSAEWOULDBLOCK return value, as Scott
writes.
Right now the problem is that apperantly some bytes are lost, and I will go
totally off track reading the message length.
Thanks for the help.

/Riverwind



Relevant Pages

  • Re: WMEncoder errors/problems
    ... I have my vcr set up to my capture card. ... So when i stream ... Please post the correct error code. ... > fast machine with lots and lots of RAM, ...
    (microsoft.public.windowsmedia.encoder)
  • Re: Error Code OxCOOD11BB
    ... Error C00D11BB is "Unsupported protocol". ... you will receive this when you are trying to stream a file over a protocol ... "Stuart" wrote in message ... >I have been getting this error code when trying to view WMV video streams ...
    (microsoft.public.windowsmedia.player)
  • Re: ERROR CODES
    ... There's a hotfix for this error code, ... It assumes you're sending script commands with your stream ... down saying that the encoding process was unable to keep up with the amount ...
    (microsoft.public.windowsmedia.player)
  • another C00D11B3 error
    ... it doesn't work with error code C00D11B3. ... WMP and there it works. ... I now have the default Network settings, but tried a lot of them. ... (This is an other stream I often try to use and doesn't work either. ...
    (microsoft.public.windowsmedia.player)
  • RE: C00D2EF6
    ... I have no error code, the palyer will not save the ... stream or open it up. ... "Misty" wrote: ...
    (microsoft.public.windowsmedia.player)