summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Le Blanc <lbarnaud@php.net>2008-10-23 20:21:30 +0000
committerArnaud Le Blanc <lbarnaud@php.net>2008-10-23 20:21:30 +0000
commit8b969f44d706f0c21c106e3151b7f5eece6a692a (patch)
tree8bdf14f17c0d034ac41fc3991c485bf6a8fddd4a
parenta29aef485a20f5711d770ba803ef7ca018a542bb (diff)
downloadphp-git-8b969f44d706f0c21c106e3151b7f5eece6a692a.tar.gz
MFH: Fixed bug #46360 (TCP_NODELAY constant for socket_{get,set}_option)
[DOC] Added TCP_NODELAY constant to sockets extension, to be used with socket_set_option() to disable TCP's Nagle algorithm. Avail in PHP>=5.2.7.
-rw-r--r--ext/sockets/sockets.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 9c6db0bb31..28a9cff38c 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -509,6 +509,9 @@ PHP_MINIT_FUNCTION(sockets)
REGISTER_LONG_CONSTANT("SO_ERROR", SO_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SOL_SOCKET", SOL_SOCKET, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("SOMAXCONN", SOMAXCONN, CONST_CS | CONST_PERSISTENT);
+#ifdef TCP_NODELAY
+ REGISTER_LONG_CONSTANT("TCP_NODELAY", TCP_NODELAY, CONST_CS | CONST_PERSISTENT);
+#endif
REGISTER_LONG_CONSTANT("PHP_NORMAL_READ", PHP_NORMAL_READ, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT("PHP_BINARY_READ", PHP_BINARY_READ, CONST_CS | CONST_PERSISTENT);