Patch php-fcgi-ndelay.patch for CGI/CLI related Bug #46723
Patch version 2010-03-20 17:36 UTC
Return to Bug #46723 |
Download this patch
Patch Revisions:
Developer: jost_boekemeier@users.sf.net
*** fastcgi.c 2010/03/20 17:21:23 1.1
--- fastcgi.c 2010/03/20 17:24:32
***************
*** 67,72 ****
--- 67,73 ----
# include <sys/socket.h>
# include <sys/un.h>
# include <netinet/in.h>
+ # include <netinet/tcp.h>
# include <arpa/inet.h>
# include <netdb.h>
# include <signal.h>
***************
*** 347,352 ****
--- 348,354 ----
int listen_socket;
sa_t sa;
socklen_t sock_len;
+ int on = 1;
#ifdef SO_REUSEADDR
# ifdef _WIN32
BOOL reuse = 1;
***************
*** 446,451 ****
--- 448,454 ----
#ifdef SO_REUSEADDR
setsockopt(listen_socket, SOL_SOCKET, SO_REUSEADDR, (char*)&reuse, sizeof(reuse)) < 0 ||
#endif
+ setsockopt(listen_socket, IPPROTO_TCP, TCP_NODELAY, (char*)&on, sizeof(on) ) < 0 ||
bind(listen_socket, (struct sockaddr *) &sa, sock_len) < 0 ||
listen(listen_socket, backlog) < 0) {
|