sockets - read ()
- Read from a file descriptor
- blocking function. returns only when there are bytes to read
- It is not an error for the return value to be less than count
/* * READ ( ) * * RETURN * ====== * # bytes read * 0 = EOF (socket closed by peer) */ #include <unistd.h> ssize_t read (int fd, // in: file descriptor to read from void* buf, // out: buffer to write to size_t count); // in: max # of bytes to read