Em Mon, 07 Mar 2011 09:51:31 -, Stas Malyshev
escreveu:
I suppose this information could be queried, but would you want to do
the cast and retrieve this data in every call say in a socket_read loop?
I'd ask why you need socket_read and not just fread if you use streams?
If you need d
Hi!
I suppose this information could be queried, but would you want to do the
cast and retrieve this data in every call say in a socket_read loop?
I'd ask why you need socket_read and not just fread if you use streams?
If you need deeper semantics, then yes, either you use resources or you
c
Em Mon, 07 Mar 2011 09:18:24 -, Stas Malyshev
escreveu:
I think we already have PHP_STREAM_AS_SOCKETD, which should be
appropriate here, not?
That will indeed give you a socket descriptor, but
1) it's not directly available to user-space.
2) you still have to create a socket extension r
Hi!
I think we already have PHP_STREAM_AS_SOCKETD, which should be
appropriate here, not?
That will indeed give you a socket descriptor, but
1) it's not directly available to user-space.
2) you still have to create a socket extension resource in order to pass
it to functions of that extension.
Em Mon, 07 Mar 2011 01:37:44 -, Stas Malyshev
escreveu:
I think a better option would be a function to convert a php socket
stream into a socket resource. That would avoid limiting this to
socket_get_options/socket_set_options and polluting the socket ext
functions prologue with these c
Hi!
I think a better option would be a function to convert a php socket stream
into a socket resource. That would avoid limiting this to
socket_get_options/socket_set_options and polluting the socket ext
functions prologue with these conversions.
I think we already have PHP_STREAM_AS_SOCKETD,
On Sat, 05 Mar 2011 15:19:31 -, Vincent NEGRIER
wrote:
The goal of this patch is to allow user handling of low level socket
options for stream sockets created with stream_socket_*() or fsockopen()
functions.
I choose to extend the socket_get_options() and socket_set_options()
funct