in reply to Re^4: socket read buffer full
in thread socket read buffer full
this is how the select(2) works. From man select:
select() and pselect() allow a program to monitor multiple file descriptors, waiting until one or more of the file descriptors become "ready" for some class of I/O operation (e.g., input possible). A file descriptor is considered ready if it is possible to perform the corresponding I/O operation (e.g., read(2)) without blocking.
So can_read returns true if you can read without blocking, and you can.
|
|---|