php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | |
Patch add-tcp-nodelay for Streams related Bug #51879Patch version 2011-02-17 20:27 UTC Return to Bug #51879 | Download this patchThis patch is obsolete Obsoleted by patches: This patch renders other patches obsolete Obsolete patches: Patch Revisions:
Developer: seld@php.netIndex: ext/standard/file.c =================================================================== --- ext/standard/file.c (revision 308439) +++ ext/standard/file.c (working copy) @@ -217,6 +217,7 @@ REGISTER_LONG_CONSTANT("STREAM_CLIENT_PERSISTENT", PHP_STREAM_CLIENT_PERSISTENT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("STREAM_CLIENT_ASYNC_CONNECT", PHP_STREAM_CLIENT_ASYNC_CONNECT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("STREAM_CLIENT_CONNECT", PHP_STREAM_CLIENT_CONNECT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("STREAM_CLIENT_NODELAY", PHP_STREAM_CLIENT_NO_DELAY, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("STREAM_CRYPTO_METHOD_SSLv2_CLIENT", STREAM_CRYPTO_METHOD_SSLv2_CLIENT, CONST_CS|CONST_PERSISTENT); REGISTER_LONG_CONSTANT("STREAM_CRYPTO_METHOD_SSLv3_CLIENT", STREAM_CRYPTO_METHOD_SSLv3_CLIENT, CONST_CS|CONST_PERSISTENT); Index: ext/standard/streamsfuncs.c =================================================================== --- ext/standard/streamsfuncs.c (revision 308439) +++ ext/standard/streamsfuncs.c (working copy) @@ -134,7 +134,8 @@ stream = php_stream_xport_create(host, host_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, STREAM_XPORT_CLIENT | (flags & PHP_STREAM_CLIENT_CONNECT ? STREAM_XPORT_CONNECT : 0) | - (flags & PHP_STREAM_CLIENT_ASYNC_CONNECT ? STREAM_XPORT_CONNECT_ASYNC : 0), + (flags & PHP_STREAM_CLIENT_ASYNC_CONNECT ? STREAM_XPORT_CONNECT_ASYNC : 0) | + (flags & PHP_STREAM_CLIENT_NO_DELAY ? TCP_NODELAY : 0), hashkey, &tv, context, &errstr, &err); Index: ext/standard/streamsfuncs.h =================================================================== --- ext/standard/streamsfuncs.h (revision 308439) +++ ext/standard/streamsfuncs.h (working copy) @@ -22,6 +22,7 @@ #define PHP_STREAM_CLIENT_PERSISTENT 1 #define PHP_STREAM_CLIENT_ASYNC_CONNECT 2 #define PHP_STREAM_CLIENT_CONNECT 4 +#define PHP_STREAM_CLIENT_NO_DELAY 8 PHP_FUNCTION(stream_socket_client); PHP_FUNCTION(stream_socket_server); |
Copyright © 2001-2024 The PHP Group All rights reserved. |
Last updated: Thu Nov 21 16:01:29 2024 UTC |