Date: Mon, 12 Oct 2009 15:52:47 +0200 From: Ivan Voras <ivoras@freebsd.org> To: freebsd-hackers@freebsd.org Subject: Re: "global" TCP_NODELAY? Message-ID: <havcb8$kfu$1@ger.gmane.org> In-Reply-To: <4AD333F4.2020304@tomjudge.com> References: <hav3qp$n7n$1@ger.gmane.org> <4AD31431.4060503@comsys.com.ua> <hav5t5$u1t$1@ger.gmane.org> <4AD333F4.2020304@tomjudge.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Tom Judge wrote: > Ivan Voras wrote: >> Sergey Smitienko wrote: >>> Ivan Voras пишет: >>>> I'm trying to work around some extreme brain damageness in PHP (yes, >>>> it sucks) which doesn't have a way to set TCP_NODELAY on stream >>>> sockets so I'm wondering what are my other options? Is there a way >>>> to set TCP_NODELAY system-wide? >>> What's wrong with: >>> >>> <?php >>> $socket = socket_create_listen(1223); >>> socket_set_option($socket, SOL_SOCKET, TCP_NODELAY, 1); >>> var_dump(socket_get_option($socket, SOL_SOCKET, TCP_NODELAY)); >>> ?> >> >> These "socket objects" are completely different from fsockopen() >> "stream socket objects", and socket_set_option() doesn't work on >> those. Consequently, you cannot use fgets() and friends to work with >> sockets created with socket_*() and there is apparently no way to wrap >> sockets in streams. It's an already finished application that uses >> stream-like functions (e.g. fgets() and friends) and rewriting it to >> use raw socket recv() and send() would be nasty. > Is this for php java bridge by any chance? If so I believe we have a > patch floating around so that it can use UNIX sockets rather than INET > ones. No, something in-house.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?havcb8$kfu$1>