top | item 37583472

(no title)

thricegr8 | 2 years ago

I know this seems the antithesis, but I've always wondered if you could fold and mangle cURL to actually act as a web server?

discuss

order

tyingq|2 years ago

I don't think so. Poking around the source code, the only thing exposed in the cli client around listen() and accept() is related to FTP, because of the way FTP works. It does mean, though, that libcurl has functions like Curl_conn_tcp_listen_set() and Curl_conn_tcp_accepted_set() that could be used for what you're describing. It's just that they are only used for FTP now.