* Java has a
family of IO classes;
* c++ has a
family of stream classes derived from class ios;
* unix has various file-like things.
“pipe” and “stream” are 2 general terminologies for an input/output destination with sequential access. A file is one subtype of stream. Therefore java and c++ access files using their family of classes above.
 c++ gives each sequential stream a get-ptr and a put-ptr.
A named pipe is an entity in the file system….
TCP (not UDP) socket is a stream-oriented protocol. Sockets, either unix domain or TCP (not udp), is also like a pipe/stream. In fact, Unix treats any socket as a file so you can read and write to a it like a file. Perl liberally “confuses” file handles and sockets, just as C uses the same type of file-descriptor-number for files and sockets.
TCP (not UDP) is ordered — if two messages are sent over a connection in sequence, the first message will reach the receiving application first. When data segments arrive in the wrong order, TCP buffers the out-of-order data until all data can be properly re-ordered and delivered to the application.
Python wraps the socket descriptor number in a socket object, but you can still get the underlying descriptor number by mySocket.fileno()–
mySocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)