I'd like to know if a fd has data available for reading. I have tried ioctl
with FIONREAD
but that results in a "Operation not supported error". Any ideas?
You can use select()
, with a zero (not NULL
) timeout.
Use poll()
or select()
on your file descriptor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With