[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

6. Implementing external select

Function: int MHD_get_fdset (struct MHD_Daemon *daemon, fd_set * read_fd_set, fd_set * write_fd_set, fd_set * except_fd_set, int *max_fd)

Obtain the select() sets for this daemon. The daemon's socket is added to read_fd_set. The list of currently existent connections is scanned and their file descriptors added to the correct set.

see (libc), for details on file descriptor sets.

After the call completed successfully: the variable referenced by max_fd references the file descriptor with highest integer identifier. The variable must be set to zero before invoking this function.

Return MHD_YES on success, MHD_NO if: the arguments are invalid (example: NULL pointers); this daemon was not started with the right options for this call.

Function: int MHD_get_timeout (struct MHD_Daemon *daemon, unsigned long long *timeout)

Obtain timeout value for select for this daemon (only needed if connection timeout is used). The returned value is how long select() should at most block, not the timeout value set for connections.

timeout

set to the timeout (in milliseconds).

Return MHD_YES on success, MHD_NO if timeouts are not used (or no connections exist that would necessiate the use of a timeout right now).


This document was generated by Christian Grothoff on May, 26 2008 using texi2html 1.78.