cURL / Mailing Lists / curl-library / Single Mail

curl-library

Working with curl connections as with sockets.

From: tetetest tetetest <tetetest_at_rambler.ru>
Date: Thu, 24 Apr 2008 13:42:36 +0400

Hello,

It would be nice to have cooked connect, send, receive, poll, and
disconnect
functions. By "cooked" I mean the following:

'connect' is done using usual curl_easy_setopt()/curl_easy_perform(), so
the application does not need to hassle with proxy/SSL negotiations and
all
such. The difference from regular, say, http transfer is that the
"performance" finishes after connecting to the server, not after the
protocol session is complete. After the connection is established, you
could use the handle in subsequent send/receive operations.

'send' and 'receive' (I am dreaming here) work with curl handles, not
sockets. Thus, it will be easy to write applications implementing custom
network protocols, yet capable of working though proxies and SSL
connections.

I guess that this (or similar) functionality is already in the guts of
libcurl, but is not usable from outside. Wouldn't it be great if there
were
some public interface to send/receive data?

Rationale:

Currently we are forced to use predefined protocols (known by libcurl).
If
you want something non-standard, you should either implement it yourself
from scratch (using sockets), or modify libcurl.

(Yes, you can send and receive arbitrary data from callback functions.
Isn't it ugly? I tried to write a simple libcurl application that talks
to
a telnet server and... I couldn't).
Received on 2008-04-24