From f1242944c301c8988604c0ec3e012863785c268c Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 28 Sep 2002 23:30:31 +0000 Subject: [PATCH] More streams related changes. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@97309 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/stream-set-blocking.xml | 60 ++++++++++++++ .../functions/stream-set-timeout.xml | 81 +++++++++++++++++++ .../network/functions/socket-get-status.xml | 6 +- .../network/functions/socket-set-blocking.xml | 21 +---- .../network/functions/socket-set-timeout.xml | 42 +--------- 5 files changed, 150 insertions(+), 60 deletions(-) create mode 100644 reference/filesystem/functions/stream-set-blocking.xml create mode 100644 reference/filesystem/functions/stream-set-timeout.xml diff --git a/reference/filesystem/functions/stream-set-blocking.xml b/reference/filesystem/functions/stream-set-blocking.xml new file mode 100644 index 0000000000..0d004976e4 --- /dev/null +++ b/reference/filesystem/functions/stream-set-blocking.xml @@ -0,0 +1,60 @@ + + + + + + stream_set_blocking + Set blocking/non-blocking mode on a stream + + + Description + + boolstream_set_blocking + resourcestream + intmode + + + If mode is &false;, the given stream + will be switched to non-blocking mode, and if &true;, it + will be switched to blocking mode. This affects calls like + fgets and fread + that read from the stream. In non-blocking mode an + fgets call will always return right away + while in blocking mode it will wait for data to become available + on the stream. + + + This function was previously called as + set_socket_blocking and later + socket_set_blocking but this usage is deprecated. + + + + Prior to PHP 4.3, this function only worked on socket based streams. + Since PHP 4.3, this function works for any stream that supports + non-blocking mode (currently, regular files and socket streams). + + + + + + diff --git a/reference/filesystem/functions/stream-set-timeout.xml b/reference/filesystem/functions/stream-set-timeout.xml new file mode 100644 index 0000000000..3f552dbe18 --- /dev/null +++ b/reference/filesystem/functions/stream-set-timeout.xml @@ -0,0 +1,81 @@ + + + + + + stream_set_timeout + Set timeout period on a stream + + + Description + + boolstream_set_timeout + resourcestream + intseconds + intmicroseconds + + + Sets the timeout value on stream, + expressed in the sum of seconds and + microseconds. + + <function>stream_set_timeout</function> Example + + +]]> + + + + + + As of PHP 4.3, this function can (potentially) work on any kind of + stream. In PHP 4.3, socket based streams are still the only kind + supported in the PHP core, although streams from other extensions + may support this function. + + + + This function was previously called as + set_socket_timeout and later + socket_set_timeout but this usage is deprecated. + + + See also: fsockopen and fopen. + + + + + diff --git a/reference/network/functions/socket-get-status.xml b/reference/network/functions/socket-get-status.xml index b91df08def..ccf37aa9d4 100644 --- a/reference/network/functions/socket-get-status.xml +++ b/reference/network/functions/socket-get-status.xml @@ -1,17 +1,17 @@ - + socket_get_status - Alias of file_get_meta_data. + Alias of stream_get_meta_data. Description - This function is an alias of file_get_meta_data. + This function is an alias of stream_get_meta_data. diff --git a/reference/network/functions/socket-set-blocking.xml b/reference/network/functions/socket-set-blocking.xml index 9f9e6565ce..729c3753dd 100644 --- a/reference/network/functions/socket-set-blocking.xml +++ b/reference/network/functions/socket-set-blocking.xml @@ -1,30 +1,15 @@ - + socket_set_blocking - Set blocking/non-blocking mode on a socket + Alias for stream_set_blocking Description - - boolsocket_set_blocking - resourcesocket descriptor - intmode - - If mode is &false;, the given socket - descriptor will be switched to non-blocking mode, and if &true;, it - will be switched to blocking mode. This affects calls like - fgets that read from the socket. In - non-blocking mode an fgets call will always - return right away while in blocking mode it will wait for data to - become available on the socket. - - - This function was previously called as - set_socket_blocking but this usage is deprecated. + This function is an alias for stream_set_blocking. diff --git a/reference/network/functions/socket-set-timeout.xml b/reference/network/functions/socket-set-timeout.xml index 9112848c3d..d302f7b9cf 100644 --- a/reference/network/functions/socket-set-timeout.xml +++ b/reference/network/functions/socket-set-timeout.xml @@ -1,51 +1,15 @@ - + socket_set_timeout - Set timeout period on a socket + Alias for stream_set_timeout Description - - boolsocket_set_timeout - resourcesocket descriptor - intseconds - intmicroseconds - - Sets the timeout value on socket descriptor, - expressed in the sum of seconds and - microseconds. - - <function>socket_set_timeout</function> Example - - -]]> - - - - - This function was previously called as - set_socket_timeout but this usage is deprecated. - - - See also: fsockopen and fopen. + This is an alias for stream_set_timeout.