Req #49416 [Com]: Add stream_socket_listen() and stream_socket_set_option() functions

From: Date: Tue, 15 Jul 2014 16:32:37 +0000
Subject: Req #49416 [Com]: Add stream_socket_listen() and stream_socket_set_option() functions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-186639@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=49416&edit=1

 ID:                 49416
 Comment by:         jpauli@php.net
 Reported by:        kak dot serpom dot po dot yaitsam at gmail dot com
 Summary:            Add stream_socket_listen() and
                     stream_socket_set_option() functions
 Status:             Open
 Type:               Feature/Change Request
 Package:            Streams related
 Operating System:   *
 PHP Version:        *
 Block user comment: N
 Private report:     N

 New Comment:

I can't get how libevent would change anything on your problem. Could you elaborate please,
knowing PHP wont use such a layer internally anyway ?

Also, I would strongly recommand you to use ext/socket.
ext/socket is a very thin wrapper over OS's socket capabilities, whereas stream_ suffer from a
much more complex layer.
For example, for socket low level option, such as SO_REUSE , ext/socket is much more suitable. http://www.php.net/ref.sockets


Previous Comments:
------------------------------------------------------------------------
[2009-08-30 14:27:56] kak dot serpom dot po dot yaitsam at gmail dot com

Description:
------------
Please, add function stream_socket_listen(resource,backlog): 
it should call listen() for the socket created by 
stream_socket_server beforehand.

I need to use stream_socket_server but I can not use socket_*,
because of libevent.

Also, it would be nice to have a stream_socket_set_option function,
which allows to apply SO_REUSE and other parameters.

Thanks.



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



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


Thread (3 messages)

« previous php.bugs (#186639) next »