Commit Graph

57 Commits

Author SHA1 Message Date
Michael Wallner
5b277c4da0 add backlock socket context option for stream_socket_server(),
which had a hardcoded backlog of 5 at two occurrances
2010-03-11 16:37:24 +00:00
Ilia Alshanetsky
7e1f29e930 Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). 2010-01-18 12:50:08 +00:00
Sebastian Bergmann
9ba1e81665 sed -i "s#1997-2009#1997-2010#g" **/*.c **/*.h **/*.php 2010-01-03 09:23:27 +00:00
Stanislav Malyshev
0401c6ca2d fix bug #50196 2009-12-19 01:13:33 +00:00
Dmitry Stogov
4b1c7c5615 Fixed ext/standard/tests/streams/stream_get_contents_002.phpt 2009-09-23 10:25:54 +00:00
Sriram Natarajan
ac2d3990f2 - Fixed bug #49447 (php engine need to correctly check for socket API
return status on windows). (Sriram Natarajan)
2009-09-04 07:59:48 +00:00
Ilia Alshanetsky
311a87c8d7 MFB: Fixed bug #44874 (dead pfsockopen'ed sockets aren't reaped when
the remote end restarts)
2009-02-09 02:55:45 +00:00
Felipe Pena
7c989115c2 MFH:
- Added check for EWOULDBLOCK
- Using EWOULDBLOCK instead of EAGAIN by portability issues
(Related to #46917)
2009-01-07 20:21:46 +00:00
Sebastian Bergmann
08659c2dcd MFH: Bump copyright year, 3 of 3. 2008-12-31 11:15:49 +00:00
David Soria Parra
a9282f72a8 MFH: Revert fix for 43782, as it caused problems. 2008-11-24 15:36:47 +00:00
David Soria Parra
9f68483734 MFH: Fixed bug #43782 (feof() does not detect timeout on socket) 2008-08-26 16:06:36 +00:00
Jani Taskinen
d91bc9eca2 MFH:- Fixed bug #44127 (UNIX abstract namespace socket connect does not work) 2008-07-16 14:08:38 +00:00
Antony Dovgal
cf7e15c3a0 MFH: manage references of stream context properly 2008-07-11 10:25:15 +00:00
Andrey Hristov
49add03404 char **error_message was passed but not used. This causes problems in cases
of getaddrinfo() failure, because the upper layers don't get the error.
initialize a variable because we were reading initialized in case of error.
2008-03-10 19:54:47 +00:00
Ilia Alshanetsky
425c4bca2e Fixed bug #44233 (MSG_PEEK undefined under BeOS R5) 2008-02-27 00:30:24 +00:00
Sebastian Bergmann
d1dded8751 MFH: Bump copyright year, 2 of 2. 2007-12-31 07:17:19 +00:00
Dmitry Stogov
78932ba2f9 Fixed bug #41984 (Hangs on large SoapClient requests) 2007-07-24 14:24:44 +00:00
Jani Taskinen
dd23eb0c88 MFH:- Fixed bugs #36796, #36918, #41371 (stream_set_blocking() does not work) 2007-07-17 13:28:44 +00:00
Sebastian Bergmann
4223aa4d5e MFH: Bump year. 2007-01-01 09:36:18 +00:00
Antony Dovgal
f807343197 MFH 2006-12-21 01:08:04 +00:00
Dmitry Stogov
03312cc0d9 Added function stream_socket_shutdown(). It is a wraper for system shutdown() function, that shut downs part of a full-duplex connection 2006-12-19 08:58:58 +00:00
Antony Dovgal
1cc0339d40 MFH: fix crash when parsing invalid hostnames/IPs 2006-10-11 12:53:56 +00:00
Sara Golemon
3a4a0e3cef MFH: Prevent bindport from being used uninitialized 2006-02-02 18:16:43 +00:00
foobar
5bd93221a8 bump year and license version 2006-01-01 12:51:34 +00:00
foobar
23e671a51e - Bumber up year 2005-08-03 14:08:58 +00:00
Sebastian Bergmann
1d9baf3dd5 ZTS fix. 2005-06-14 05:13:01 +00:00
Ilia Alshanetsky
b36d4ae02c Added bindto socket context option. 2005-06-14 02:39:42 +00:00
Wez Furlong
ff4e970fb1 Make new poll stuff work on win32 (and still be safe on unix) 2004-09-17 14:36:55 +00:00
Wez Furlong
99e290f882 Fix for Bug #24189: possibly unsafe select(2) usage.
We avoid the problem by using poll(2).

On systems without poll(2) (older bsd-ish systems, and win32), we emulate
poll(2) using select(2) and check for valid descriptors before attempting
to access them via the descriptor sets.

If an out-of-range descriptor is detected, an E_WARNING is raised suggesting
that PHP should be recompiled with a larger FD_SETSIZE (and also with a
suggested value).

Most uses of select(2) in the source are to poll a single descriptor, so
a couple of handy wrapper functions have been added to make this easier.

A configure option --enable-fd-setsize has been added to both the unix and
win32 builds; on unix we default to 16384 and on windows we default to 256.
Windows FD_SETSIZE imposes a limit on the maximum number of descriptors that
can be select()ed at once, whereas the unix FD_SETSIZE limit is based on the
highest numbered descriptor; 256 should be plenty for PHP scripts under windows
(the default OS setting is 64).

The win32 specific parts are untested; will do that now.
2004-09-17 12:44:56 +00:00
Ilia Alshanetsky
c84bd49fb5 Using int when long should be used. 2004-08-22 18:05:24 +00:00
Wez Furlong
b21a7357fc Fix for #29256 from Dmitry, very slightly modified 2004-08-10 13:44:43 +00:00
Wez Furlong
d0be029908 zts fix... 2004-07-31 16:34:44 +00:00
Wez Furlong
ae7285d658 Misc sendto/recvfrom tweaks that have been pending here for a while... 2004-07-31 10:56:55 +00:00
Wez Furlong
05a3fabacb Make sure this is initialized... 2004-07-31 10:49:09 +00:00
Ard Biesheuvel
b303ba089c More wordsize fixes 2004-03-08 23:11:45 +00:00
Wez Furlong
a44838e8a3 Fix a bug in the persistent socket liveness checks and feof(); they were
using the default socket timeout of 60 seconds before returning the socket
to the calling script.  The reason they were using that value is that the
same code is used for feof(), so the fix is allowing the caller to
indicate the timeout value for liveness checks.

A possible remaining issue now is that 0 second timeout[1] for pfsockopen
is possibly too short; it's impossible to specify a sane value for all
possible uses, so maybe we need a stream context or an .ini option to
control this, or maybe use the timeout value that was passed to
pfsockopen().

# [1] by timeout, I mean the time that PHP will wait for data on a
# persistent socket before deciding if a new connection should be made;
# NOT the timeout while waiting for a new connection to be established.
2004-02-04 22:46:44 +00:00
Andi Gutmans
dbeb4158d2 - A belated happy holidays and PHP 5 2004-01-08 08:18:22 +00:00
Wez Furlong
da9093be3a this can't be persistent 2003-12-02 16:35:19 +00:00
Ilia Alshanetsky
c344754d48 Removed unused variables. 2003-11-30 19:43:30 +00:00
Wez Furlong
37f135ceef Add stream_socket_sendto and stream_socket_recvfrom which work very much
like sendto() and recvfrom() syscalls.
2003-11-29 21:46:50 +00:00
Wez Furlong
6d86bb9e40 (sort of) MFB, feof fix for sockets. 2003-11-28 23:20:23 +00:00
Wez Furlong
3ee72aa5be port "liveness" checks and a couple of other things from the 4.3 branch.
Liveness checks are used to validate persistent socket connects when they
are re-used.
2003-11-27 17:39:01 +00:00
Wez Furlong
590b3ccc79 Set the EOF indicator after each read attempt.
This prevents it getting stuck in the on position.
2003-10-08 10:55:51 +00:00
Wez Furlong
5ecc91c27d Merge selectable descriptor casting from PHP_4_3 branch. 2003-06-28 11:24:47 +00:00
Edin Kadribasic
6e2743023b Win32 build fixes for openssl 2003-06-15 23:34:46 +00:00
James Cox
f68c7ff249 updating license information in the headers. 2003-06-10 20:04:29 +00:00
Sebastian Bergmann
85a13e3e9a Fix warnings. 2003-05-17 06:21:34 +00:00
Sara Golemon
d6c24de842 Add IPv6 support to stream_socket_client/server() 2003-04-05 02:42:12 +00:00
Wez Furlong
267db80b21 avoid unsigned issues. 2003-03-18 15:15:10 +00:00
Wez Furlong
16e705a547 64bit fixes 2003-03-15 13:29:56 +00:00