Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33577 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42021 invoked by uid 1010); 2 Dec 2007 20:45:37 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42002 invoked from network); 2 Dec 2007 20:45:35 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2007 20:45:35 -0000 Received: from [127.0.0.1] ([127.0.0.1:29179]) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ECSTREAM id D7/10-40848-F6913574 for ; Sun, 02 Dec 2007 15:45:35 -0500 Authentication-Results: pb1.pair.com header.from=vincent@optilian.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=vincent@optilian.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain optilian.com from 195.68.251.133 cause and error) X-PHP-List-Original-Sender: vincent@optilian.com X-Host-Fingerprint: 195.68.251.133 rectophobia.com Received: from [195.68.251.133] ([195.68.251.133:45113] helo=t0x.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8C/94-24257-66C02574 for ; Sat, 01 Dec 2007 20:37:44 -0500 Received: from [10.0.0.106] (six [10.0.0.106]) by t0x.net (8.14.2/8.14.2/Debian-2) with ESMTP id lB21bcM4018756 for ; Sun, 2 Dec 2007 02:37:38 +0100 Message-ID: <47520C61.605@optilian.com> Date: Sun, 02 Dec 2007 02:37:37 +0100 User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: internals@lists.php.net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [PATCH] implement stream_set_write_buffer for sockets From: vincent@optilian.com (Vincent NEGRIER) Hello, Currently stream_set_write_buffer() only works with file streams. If used on socket streams it always returns -1 and does nothing. This can be quite problematic when using datagram sockets because any datagram bigger than the default 8Kb gets chopped and more than one datagram get sent, eventually messing up with the receiving side. This small patch adds support for sockets in stream_set_write_buffer(), I have tested it and it fixed my problem, but if it needs refinements i'd be glad to try and help more. diff against 5.2.5 is here: http://rectophobia.com/~six/socket_write_buffer.diff Regards, Vincent