cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: no custom read() write() callbacks

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 18 Jan 2010 23:53:16 +0100 (CET)

On Mon, 18 Jan 2010, Leon Winter wrote:

> I just caught a quick look at libcurl's source and I spotted probably the
> spots a patch could be applied best: Curl_read() prefered over
> Curl_read_plain() since it more highlevel and also Curl_write() instead of
> send_plain() for the same reason.

I would rather suggest you truly replace read() and write() so you make sure
the sread() and swrite() function/macro calls are what should instead use a
function pointer.

> Since we will use real callbacks for the data pushed on tcp session (normal
> case) we dont need the internal socket anymore. Therefore we must avoid
> setting it up und destroying it when using this custom callbacks.

Wouldn't you? Well then you speak of other ways of customizations and I don't
think you necessary should make them happen just because you change read and
write but they are rather independent. For example we already have the
CURLOPT_OPENSOCKETFUNCTION that lets you replace the socket() call basically.

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