cURL / Mailing Lists / curl-library / Single Mail

curl-library

small question about "struct connectdata"

From: amit paliwal <amit.ambitions_at_gmail.com>
Date: Wed, 5 Jan 2011 10:45:59 -0500

This structure contains two members:

Curl_recv *recv[2];
Curl_send *send[2];

and Curl_recv is defined as:

/* return the count of bytes read, or -1 on error */
typedef ssize_t (Curl_recv)(struct connectdata *conn, /* connection data */
                            int sockindex, /* socketindex */
                            char *buf, /* store data here */
                            size_t len, /* max amount to read
*/
                            CURLcode *err); /* error to return */

So i think we are handling some function pointer here. Now my question is,
why do we need two elements in recv[] array?

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-05