[fpc-pascal]Multiplexing I/O (Sockets)
Sebastian Günther
sguenther at gmx.de
Sat Sep 21 16:53:04 CEST 2002
Michael.VanCanneyt at wisa.be schrieb:
>
> On Sat, 21 Sep 2002, James Mills wrote:
>
>
>>I remember a while back with C++ I used select and fd's to check if data
>>was available in the socket.
>>
>>Can that be done with pascal? Could someone show me please, I've almost
>>forgotten how it's done...
>
>
> Select() is available. Just check the documentation of the linux unit for
> examples.
and, of course, there are libAsync and fpAsync as wrappers for
select()... (libAsync is purely procedural, while fpAsync uses classes)
As select() can be quite painful in more complex situations, fpAsync
will hide most of this complexity, and adds more functionality (e.g.
powerful timers). In the future it will be available on more platforms
than Linux/Unix.
Both are part of the FPC packages.
- Sebastian
More information about the fpc-pascal
mailing list