Re: CAsyncSocket and Send



Are you using TCP/IP or UDP?

Are you making sure that, if you are handling strings, that you insert a terminating NUL
character after the characters received? For example, if you have a 1K buffer, receive 4
bytes representing 4 8-bit characters, then you must put a NUL in [4] a NUL character, or
whatever is seen there will be seen as part of the string.
joe

On Tue, 10 Jan 2006 16:03:02 -0800, "Vinoj" <Vinoj@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

>Hello,
>
>I have two programs that use async sockets. Occasionally, there is garbage
>(extra bytes) being sent after data, thus confusing my finite state machine.
>Is there a way to track everytime the send() is called? Any ideas on why
>this could be happening?
>
>I don't know if it matters, but the sending side of the program is written
>in C and the receiving side is MFC. Thanks.
>
>Vinoj
Joseph M. Newcomer [MVP]
email: newcomer@xxxxxxxxxxxx
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
.


Loading