From: Ilia Alshanetsky Date: Mon, 18 Jan 2010 12:50:08 +0000 (+0000) Subject: Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). X-Git-Tag: php-5.4.0alpha1~191^2~2073 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=397b6bcdf40c8580401b703c74ff92da68825fa9;p=php Fixed bug #50787 (stream_set_write_buffer() has no effect on socket streams). --- diff --git a/main/streams/xp_socket.c b/main/streams/xp_socket.c index c9fee01a5c..a84ceb64c2 100644 --- a/main/streams/xp_socket.c +++ b/main/streams/xp_socket.c @@ -400,6 +400,10 @@ static int php_sockop_set_option(php_stream *stream, int option, int value, void } #endif + case PHP_STREAM_OPTION_WRITE_BUFFER: + php_stream_set_chunk_size(stream, (ptrparam ? *(size_t *)ptrparam : PHP_SOCK_CHUNK_SIZE)); + return PHP_STREAM_OPTION_RETURN_OK; + default: return PHP_STREAM_OPTION_RETURN_NOTIMPL; }