php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #51879
Patch add-tcp-nodelay revision 2011-02-17 20:45 UTC by seld@php.net
revision 2011-02-17 20:27 UTC by seld@php.net
revision 2011-02-17 19:08 UTC by seld@php.net
revision 2011-02-17 18:44 UTC by seld@php.net

Patch add-tcp-nodelay for Streams related Bug #51879

Patch version 2011-02-17 18:44 UTC

Return to Bug #51879 | Download this patch
This patch is obsolete

Obsoleted by patches:

Patch Revisions:

Developer: seld@php.net

Index: 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_TCP_NODELAY",		PHP_STREAM_CLIENT_TCP_NODELAY,		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_TCP_NODELAY ? TCP_NODELAY : 0),
 			hashkey, &tv, context, &errstr, &err);
 
 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Nov 23 23:01:26 2024 UTC