note 69505 added to function.stream-set-blocking

From: Date: Fri, 08 Sep 2006 06:13:49 +0000
Subject: note 69505 added to function.stream-set-blocking
Groups: php.notes 
Request: Send a blank email to php-notes+get-116888@lists.php.net to get a copy of this message
When you use fwrite() on a non-blocking stream, data isn't discarded silently as t dot starling said. Remember that fwrite() returns an int, and this int represents the amount of data really written to the stream. So, if you see that fwrite() returns less than the amount of written data, it means you'll have to call fwrite() again in the future to write the remaining amount of data. You can use stream_select() to wait for the stream to be available for writing, then continue writing data to the stream. Non-blocking streams are useful as you can have more than one non-blocking stream, and wait for them to be available for writing. ---- Server IP: 195.221.21.36 Probable Submitter: 88.191.19.199 (proxied: unknown) ---- Manual Page -- http://www.php.net/manual/en/function.stream-set-blocking.php Edit -- https://master.php.net/note/edit/69505 Del: integrated -- https://master.php.net/note/delete/69505/integrated Del: useless -- https://master.php.net/note/delete/69505/useless Del: bad code -- https://master.php.net/note/delete/69505/bad+code Del: spam -- https://master.php.net/note/delete/69505/spam Del: non-english -- https://master.php.net/note/delete/69505/non-english Del: in docs -- https://master.php.net/note/delete/69505/in+docs Del: other reasons-- https://master.php.net/note/delete/69505 Reject -- https://master.php.net/note/reject/69505 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116888) next »