note 59495 added to streams.basics

From: Date: Thu, 08 Dec 2005 15:22:30 +0000
Subject: note 59495 added to streams.basics
Groups: php.notes 
Request: Send a blank email to php-notes+get-99753@lists.php.net to get a copy of this message
Hello firends In crude terms, streams are chunks of data, which are carried out by low-level sockets. When you open a connection to a host, (Web server, mail server or whatever), in fact you're opening a socket to that host and then sending out streams (chunks of data) either you're sending a request or receiving a response. Streams are the flow of data that's travelling within the socket (think about a socket like a logical –not physical- pipeline handled by the operating system, A pipeline is essential just a connection For example ,When we open file by fopen() ,It creates a connection or a pipeline on that file ,so that we can write or read data on that file. Data in a stream flow along one of tow pipelines: - Data sent down s stream from your PHP script to the destination file or network server flows the write pipeline. - Data retrieved from the file or network server flows up the read pipeline. ) and transport are the protocols used to carry out the data, such as TCP. Also metadata is additional information that must be handled by sockets. Let's say you're opening a file with PHP, and this operation returns a handle or pointer to that file. In this case, when reading from the file, its contents will be read as chunks or packets of data (streams), while the respective pointer, the name of the file, size and so forth is metadata. Of course, all this data set will be transported trough a socket via a transport such as TCP. With Regards Amir Hossein Estakhrian ---- Manual Page -- http://www.php.net/manual/en/streams.basics.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+59495 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+59495&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+59495&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#99753) next »