php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #49416 Add stream_socket_listen() and stream_socket_set_option() functions
Submitted: 2009-08-30 14:27 UTC Modified: 2010-12-29 13:18 UTC
Votes:2
Avg. Score:4.5 ± 0.5
Reproduced:1 of 2 (50.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: kak dot serpom dot po dot yaitsam at gmail dot com Assigned:
Status: Open Package: Streams related
PHP Version: * OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kak dot serpom dot po dot yaitsam at gmail dot com
New email:
PHP Version: OS:

 

 [2009-08-30 14:27 UTC] 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.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-12-29 13:18 UTC] jani@php.net
-Package: Feature/Change Request +Package: Streams related -Operating System: any +Operating System: * -PHP Version: 5.3.0 +PHP Version: *
 [2010-12-29 13:18 UTC] jani@php.net
-Summary: stream_socket_listen() and stream_socket_set_option() functions. +Summary: Add stream_socket_listen() and stream_socket_set_option() functions
 [2014-07-15 16:32 UTC] jpauli@php.net
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
 
PHP Copyright © 2001-2017 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC