someone please correct me if I'm wrong, it will continue to read, or try to read, until it reads either an EOF or however many bytes you tell it to read
If your platform supports it, you can use fcntl to set the O_NONBLOCK flag on a socket, which will make read return even if it was not able to read as many bytes as you tell it to read.