Req #62906 [Com]: [feature request] add support for CURLOPT_*SOCK* options

From: Date: Mon, 11 Aug 2014 07:30:15 +0000
Subject: Req #62906 [Com]: [feature request] add support for CURLOPT_*SOCK* options
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-187066@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=62906&edit=1

 ID:                 62906
 Comment by:         mario at xenji dot com
 Reported by:        niki at gorchilov dot com
 Summary:            [feature request] add support for CURLOPT_*SOCK*
                     options
 Status:             Assigned
 Type:               Feature/Change Request
 Package:            cURL related
 Operating System:   All
 PHP Version:        Irrelevant
 Assigned To:        laruence
 Block user comment: N
 Private report:     N

 New Comment:

Are there any news about that? It's been a long time and the branch still is around. Could
anybody please review it?


Previous Comments:
------------------------------------------------------------------------
[2012-09-07 12:29:54] niki at gorchilov dot com

Any update on this?

------------------------------------------------------------------------
[2012-08-25 21:49:17] pierrick@php.net

A first draft is available here https://github.com/adoy/php-src/commits/curlsock

Laruence if you have some time a code review would be appreciated :)

------------------------------------------------------------------------
[2012-08-24 13:26:49] pierrick@php.net

I'll implement those feature in the master version of curl.

------------------------------------------------------------------------
[2012-08-24 04:49:13] niki at gorchilov dot com

Looked at PHP sources to find how the similar CURLOPT_HEADERFUNCTION has been 
implemented and here's my understanding:
- ext/curl/interface.c is the only file that needs modification
- Seems CURLOPT_SOCKOPTDATA, CURLOPT_OPENSOCKETDATA, CURLOPT_CLOSESOCKETDATA 
cannot be exported to the end user, as PHP will need it internally to pass a 
context to the callback function. No a big deal IMHO.
- remaining three options - CURLOPT_SOCKOPTFUNCTION, CURLOPT_OPENSOCKETFUNCTION, 
CURLOPT_CLOSESOCKETFUNCTION shall be added in PHP_MINIT_FUNCTION, 
_php_curl_set_default_options and _php_curl_setopt.
- all the three callbacks shall be implemented using curl_write_header as a model.

Hope this helps.

------------------------------------------------------------------------
[2012-08-24 02:32:41] laruence@php.net

what do you think? maybe expose some new constants?

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=62906


--
Edit this bug report at https://bugs.php.net/bug.php?id=62906&edit=1


Thread (18 messages)

« previous php.bugs (#187066) next »