I am using ioctl() to read the number of characters in my buffer in a socket program. However at times, when populating of the buffer is delayed, it is misinterpreted by ioctl() as the end of the message. How can this be avoided if i were to use ioctl() to know the length of my incoming message. Also I do not know the size of the message that I would receive, hence I would not be able to receive it in a static buffer recv().
Thanks, Manoj