I have figured out that I must use ioctl. There are similar questions here:
My questions are:
As there is no portable way of doing this (and often the answer is wrong), there isn't a built-in way of asking for it.
If you use non-blocking sockets, simply read as much data as possible, and only data which is present will be returned.
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