How to check amount of data available for a socket in C and Linux September 7, 2023 by Tarik Yes: #include <sys/ioctl.h> ... int count; ioctl(fd, FIONREAD, &count);