summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/fetch.c5
-rw-r--r--content/fetch.h25
-rw-r--r--content/fetchers.h26
3 files changed, 28 insertions, 28 deletions
diff --git a/content/fetch.c b/content/fetch.c
index decb261a7..11adf9cf4 100644
--- a/content/fetch.c
+++ b/content/fetch.c
@@ -379,8 +379,9 @@ fetcher_add(lwc_string *scheme, const struct fetcher_operation_table *ops)
return NSERROR_OK;
}
-/* exported interface documented in content/fetchers.h */
-nserror fetcher_fdset(fd_set *read_fd_set,
+/* exported interface documented in content/fetch.h */
+nserror
+fetch_fdset(fd_set *read_fd_set,
fd_set *write_fd_set,
fd_set *except_fd_set,
int *maxfd_out)
diff --git a/content/fetch.h b/content/fetch.h
index 3c1f1ccae..6694ffda9 100644
--- a/content/fetch.h
+++ b/content/fetch.h
@@ -210,5 +210,30 @@ const char *fetch_get_referer_to_send(struct fetch *fetch);
*/
void fetch_set_cookie(struct fetch *fetch, const char *data);
+/**
+ * Get the set of file descriptors the fetchers are currently using.
+ *
+ * This obtains the file descriptors the fetch system is using to
+ * obtain data. It will cause the fetchers to make progress, if
+ * possible, potentially completing fetches before requiring activity
+ * on file descriptors.
+ *
+ * If a set of descriptors is returned (maxfd is not -1) The caller is
+ * expected to wait on them (with select etc.) and continue to obtain
+ * the fdset with this call. This will switch the fetchers from polled
+ * mode to waiting for network activity which is much more efficient.
+ *
+ * \note If the caller does not subsequently obtain the fdset again
+ * the fetchers will fall back to the less efficient polled
+ * operation. The fallback to polled operation will only occour after
+ * a timeout which introduces additional delay.
+ *
+ * \param[out] read_fd_set The fd set for read.
+ * \param[out] write_fd_set The fd set for write.
+ * \param[out] except_fd_set The fd set for exceptions.
+ * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
+ * \return NSERROR_OK on success or appropriate error code.
+ */
+nserror fetch_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
#endif
diff --git a/content/fetchers.h b/content/fetchers.h
index cd09e92e4..6392e245e 100644
--- a/content/fetchers.h
+++ b/content/fetchers.h
@@ -129,30 +129,4 @@ nserror fetcher_init(void);
void fetcher_quit(void);
-/**
- * Get the set of file descriptors the fetchers are currently using.
- *
- * This obtains the file descriptors the fetch system is using to
- * obtain data. It will cause the fetchers to make progress, if
- * possible, potentially completing fetches before requiring activity
- * on file descriptors.
- *
- * If a set of descriptors is returned (maxfd is not -1) The caller is
- * expected to wait on them (with select etc.) and continue to obtain
- * the fdset with this call. This will switch the fetchers from polled
- * mode to waiting for network activity which is much more efficient.
- *
- * \note If the caller does not subsequently obtain the fdset again
- * the fetchers will fall back to the less efficient polled
- * operation. The fallback to polled operation will only occour after
- * a timeout which introduces additional delay.
- *
- * \param[out] read_fd_set The fd set for read.
- * \param[out] write_fd_set The fd set for write.
- * \param[out] except_fd_set The fd set for exceptions.
- * \param[out] maxfd The highest fd number in the set or -1 if no fd available.
- * \return NSERROR_OK on success or appropriate error code.
- */
-nserror fetcher_fdset(fd_set *read_fd_set, fd_set *write_fd_set, fd_set *except_fd_set, int *maxfd);
-
#endif