| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
- Added check for EWOULDBLOCK
- Using EWOULDBLOCK instead of EAGAIN by portability issues
(Related to #46917)
|
| |
|
|
|
|
|
|
| |
- drop bindlib usage on windows
- inet_pton, inet_ntop and inet_aton are always available (VC9 uses the CRT implementation, VC6 our own)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Removed duplicate sa_len check from configure.in
- Unified the sockaddr tests into PHP_SOCKADDR_CHECKS macro
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
(else they won't be usable from C++ extensions)
|
|
|
|
|
| |
# Should the LICENSE and Zend/LICENSE dates be updated too?
|
|
|
|
|
|
| |
(they #define strtoul to something that will break compilation,
and it successfully breaks the win32 IPv6 headers)
|
| |
|
|
|
|
|
|
| |
The ws2tcpip.h header links to IPv6 functions dynamically
and the generated binary will run on win98 and later.
|
| |
|
|
|
|
|
| |
like sendto() and recvfrom() syscalls.
|
| |
|
| |
|
|
|
|
| |
php_socket_t typedef.
|
|
|
|
|
|
|
|
|
|
|
| |
. stream_socket_client() - similar to fsockopen(), but more powerful.
. stream_socket_server() - Creates a server socket.
. stream_socket_accept() - Accept a client connection.
. stream_socket_get_name() - Get local or remote name of socket.
Tidy up some leaks and debug printfs.
Move more streams functions into streamsfuncs.c and streamsfuncs.h.
|
|
|
|
|
| |
# ext/ftp doesn't use streams yet so it needs to include them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Main Changes:
- Implement a socket transport layer for use by all code that needs to open
some kind of "special" socket for network or IPC.
- Extensions can register (and override) transports.
- Implement ftruncate() on streams via the ioctl-alike option interface.
- Implement mmap() on streams via the ioctl-alike option interface.
- Implement generic crypto API via the ioctl-alike option interface.
(currently only supports OpenSSL, but could support other SSL toolkits,
and other crypto transport protocols).
Impact:
- tcp sockets can be overloaded by the openssl capable sockets at runtime,
removing the link-time requirement for ssl:// and https:// sockets and
streams.
- checking stream types using PHP_STREAM_IS_SOCKET is deprecated, since
there are now a range of possible socket-type streams.
Working towards:
- socket servers using the new transport layer
- mmap support under win32
- Cleaner code.
# I will be updating the win32 build to add the new files shortly
# after this commit.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(php_socket_strerror) win32 compatible strerror replacement.
Add an E_NOTICE when a socket write fails.
|
| |
|
|
|
|
|
| |
Move timeout setting code.
|
|
|
|
|
|
| |
Juggle some includes/definitions.
Tidy up streams use in ext/standard/file.c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Eliminate similar code from network.c.
Implement fgets equivalent at the streams level, which can detect
the mac, dos and unix line endings and handle them appropriately.
The default behaviour is unix (and dos) line endings.
An ini option to control this behaviour will follow.
# Don't forget to make clean!
# I've done some testing but would appreciate feedback from
# people with scripts/extensions that seek around a lot.
|
| |
|
|
|
|
|
| |
Ugly but needed for f.e.: debians ftpd-ssl
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
php_stream_set_option which can be used in a similar way as ioctl()
to set options for streams.
Current options include buffering and blocking support.
o Buffer control is support for stdio based streams.
o Blocking/non-blocking is supported for stdio and socket based streams.
|
|
|
|
|
|
|
|
| |
integer to allow subsecond timeouts.
This supports the previous behavior of fsockopen()
Fixes bug #16261
|
|
|
|
|
| |
Bug #18436
|
|
|
|
|
|
|
|
|
| |
on win32
Also fixed error handling on unix (micropatch)
Closes Bug #14740
|
| |
|