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
You can use recv() which doesn't block by default( if the flag MSG_WAITALL is not specified)