Returns the input stream Stream from the socket file descriptor Socket. You can read from the stream using the regular stream input predicates.
If you attempt to read from a broken socket, the "Connection reset by peer" exception is raised:
tcp_select/[1,2], this exception is caught and
interpreted as an
end_of_file, and the connection is shut down.