On 30/10/17 13:37, José Mejuto wrote:
Hello,
Do exists any way using the fpsockets family to know if a "fprecv"
will block ? In other words do exists a call that return the amount of
bytes that are ready to be read/received ?
In the case the answer is no, does fpc has another family of socket
functions ? I know synapse, lNet, ... but I wish to use only fpc
packages.
Hello,
You have the function "FpIOCtl" with the option FIONREAD, I use it to
read the amount of data of the reception buffer before call "fprecv" but
if I remember correctly this only work when you configure the socket as
asynchronous.
Best Regards.
--
Victor Campillo
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal