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