|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2013-07-18 08:21 UTC] bugs dot php dot net at ss dot chernousov dot net
Description: ------------ It would be pretty useful if socket_sendmsg() could work not only with sockets, but also with numeric file descriptors. Patchesconversions-socket_sendmsg.patch (last revision 2013-07-18 08:21 UTC by bugs dot php dot net at ss dot chernousov dot net)Pull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 17:00:02 2025 UTC |
Well, when you're dealing a lot with libevent, libev, libeio and other "low-level" stuff, there's no point to convert $fd from integer to zval using fopen('php://fd/...') and then back within socket_sendmsg() each time, it's just useless waste of time. For example, when a script accepts new connections with pecl_event, it gets $fd as an integer in callback, and then it has to forward those $fd's to other processes using sendmsg. So in general it's a matter of performance and optimization, especially in pretty loaded environments. The suggested patch is extremely simple, the only thing it lacks is limiting to cli sapi only.