[fpc-pascal] FIONREAD FPC FpIOCtl for Cross platform Sockets

Marco van de Voort marcov at stack.nl
Thu Oct 8 09:50:35 CEST 2009


In our previous episode, Andrew Brunner said:
> Sockets programming often requires a poll for how much data is
> available on a particular socket descriptor.
> 
> I'm porting an inhouse library for a sockets implementation and I
> realize that while I have a FpIOCtl call in the baseUnix unit I have
> no such animal in the Sockets implement which would be cross platform.
>  Winsock does support this call and was wondering if someone wants to
> just use the windows sockets implement in the Sockets unit instead of
> using conditional definitions.

See http://bugs.freepascal.org/view.php?id=14701 , it is about the same
problem with select.

Bottom line: new unit, not in sockets. These are border cases, and while
both Unix and Windows have it in *some* form, the usage might not be the
same. The sockets unit is now fairly orthogonal, so lets keep it that way,
and not increase porting burden.
 



More information about the fpc-pascal mailing list