[Gllug] OT: Replacement for select()
salsaman
salsaman at xs4all.nl
Fri Mar 9 13:16:45 UTC 2007
Mick Farmer wrote:
>Dear GLLUGer,
>
>In my C programs I use select() to find a file descriptor that
>has pending input. On UNIXes this works with both file
>descriptors and sockets.
>
>I want to port my programs to Windows and their
>implementation of select() only works with sockets. Does
>anyone know how I can achieve the same result?
>
>I would be happy to poll the devices if this is the only
>alternative.
>
>Regards,
>
>Mick /"\
> \ /
>Linux Registered X ASCII Ribbon Campaign
>User #287765 / \ Against HTML Mail
>
>
The file gmain.c from glib has a poll implementation (g_poll) for win32
which seems to handle files and sockets. You could try cutting and
pasting from there.
Not that I encourage windows development of course.
Gabriel.
http://lives.sourceforge.net
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list