I\'m reading a stream of data through TCP/IP socket. The stream load is very uneven. Sometimes large bulks of data arrive every second, sometimes no data come for an hour. I
There is O_NONBLOCK which can be set by fcntl/F_SETFL and should result in non-blocking read.
O_NONBLOCK
fcntl
F_SETFL
read