Main Page | File List | Globals

src/select.c File Reference

select implementation for Win32 More...

#include "plibc_private.h"

Go to the source code of this file.

Functions

int _win_select (int max_fd, fd_set *rfds, fd_set *wfds, fd_set *efds, const struct timeval *tv)


Detailed Description

select implementation for Win32

Code originally written by Wez Furlong <wez@thebrainroom.com> who originally placed it under the PHP License Version 3.0. Adapted for GNUnet by Nils Durner <durner@gnunet.org>. GPLed with permission from Wez Furlong (see E-mail on gnunet-developers, also quoted in the GNUnet CVS logs).

Author:
Wez Furlong <wez@thebrainroom.com>

Nils Durner (GNUnet extensions)

Definition in file select.c.


Function Documentation

int _win_select int  max_fd,
fd_set *  rfds,
fd_set *  wfds,
fd_set *  efds,
const struct timeval *  tv
 

Win32 select() will only work with sockets, so we roll our own implementation here.

  • If you supply only sockets, this simply passes through to winsock select().
  • If you supply file handles, there is no way to distinguish between ready for read/write or OOB, so any set in which the handle is found will be marked as ready.
  • If you supply a mixture of handles and sockets, the system will interleave calls between select() and WaitForMultipleObjects(). The time slicing may cause this function call to take up to 100 ms longer than you specified.
  • Pipes are not checked for writability or errors (errno = ENOSYS)

Definition at line 47 of file select.c.

References SetErrnoFromWinsockError().


Generated on Sun Sep 4 11:16:48 2005 for PlibC by  doxygen 1.4.2