Req #73406 [NEW]: Update new addrinfo API to allow setting socket options.
| From: | email at davekok dot nl | Date: | Fri, 28 Oct 2016 06:14:36 +0000 |
| Subject: | Req #73406 [NEW]: Update new addrinfo API to allow setting socket options. | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-205045@lists.php.net to get a copy of this message | ||
From: email at davekok dot nl
Operating system:
PHP version: master-Git-2016-10-28 (Git)
Package: Sockets related
Bug Type: Feature/Change Request
Bug description:Update new addrinfo API to allow setting socket options.
Description:
------------
The new socket_getaddrinfo is a great new additions
[https://wiki.php.net/rfc/socket_getaddrinfo]. However it does not allow
making setting socket options before bind or connect are called. As the
creations of the socket and calling bind/connect are done in a single
function.
Especially for bind this is annoying as you often want to make the
socket reusable.
socket_set_option($this->socket, SOL_SOCKET, SO_REUSEADDR, 1)
Any change socket options could be passed into
socket_addrinfo_{bind,connect} as a second parameter? Something like an
array containing arrays with three arguments to describe the socket
option, which must be set after the socket is created but before connect
or bind are called.
--
Edit bug report at https://bugs.php.net/bug.php?id=73406&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=73406&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=73406&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=73406&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=73406&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=73406&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=73406&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=73406&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=73406&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=73406&r=support
Expected behavior: https://bugs.php.net/fix.php?id=73406&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=73406&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=73406&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=73406&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=73406&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=73406&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=73406&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=73406&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=73406&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=73406&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=73406&r=mysqlcfg