cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: write callback issues (was Re: A new problem)

From: Prasad J Pandit <prasad.pandit_at_comat.com>
Date: Thu, 10 Apr 2008 12:46:56 +0530 (IST)

On Thu, 10 Apr 2008, Linus Nielsen Feltzing wrote:
> Hmmm, I'm reaching for straws here, but if it returns and prints this garbage
> even before you start typing in netcat, couldn't it be that the connection
> failed, and curl_easy_perform returns with an error code?

   Well, curl_easy_perform() returns 23, which I guess is
WRITE_ERROR, but it returns 23 even when everything works good.

> If your MessageBox() call is placed after the call to curl_perform(), it
> would print uninitialized data, since the callback was never called.

   Ummn...MessageBox is inside recv_data(..), so that's unlikely.

> 1) Where exactly did you place the call to MessageBox() to produce the hex
> output? In the callback?

   Yes right, inside recv_data(..)

> 2) What is the exact command line you use to start nc?

   $ nc -kvl 9999

Thanks!

--
Regards
   - Prasad
Received on 2008-04-10