Re: CAsyncSocket and Send
- From: Joseph M. Newcomer <newcomer@xxxxxxxxxxxx>
- Date: Tue, 10 Jan 2006 20:00:00 -0500
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
.
- Follow-Ups:
- Re: CAsyncSocket and Send
- From: Vinoj
- Re: CAsyncSocket and Send
- Prev by Date: Re: TCHAR string?
- Next by Date: Re: Tracking down mouse pointer change on idle
- Previous by thread: Documentation for DragQueryFile
- Next by thread: Re: CAsyncSocket and Send
- Index(es):
Loading