aboutsummaryrefslogtreecommitdiff
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-06-01 23:10:01 +0200
committerAndreas Schneider <asn@cynapses.org>2010-06-01 23:10:01 +0200
commit518a9b8d8c34ec9d7ac7513bc4508f9bff958499 (patch)
treed0ad1d85a3949ecdf9902f79f6fd4a9b0d604b12 /libssh
parent64ae0525cf7472bb109366982c15ac678a507f1b (diff)
downloadlibssh-518a9b8d8c34ec9d7ac7513bc4508f9bff958499.tar.gz
libssh-518a9b8d8c34ec9d7ac7513bc4508f9bff958499.tar.xz
libssh-518a9b8d8c34ec9d7ac7513bc4508f9bff958499.zip
doc: Group the poll functions and add a description.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/poll.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/libssh/poll.c b/libssh/poll.c
index 67671a0..5eb80aa 100644
--- a/libssh/poll.c
+++ b/libssh/poll.c
@@ -38,6 +38,23 @@
#define SSH_POLL_CTX_CHUNK 5
#endif
+/**
+ * @defgroup libssh_poll The SSH poll functions.
+ * @ingroup libssh
+ *
+ * Add a generic way to handle sockets asynchronously.
+ *
+ * It's based on poll objects, each of which store a socket, it's events and a
+ * callback, which gets called whenever an event is set. The poll objects are
+ * attached to a poll context, which should be allocated on per thread basis.
+ *
+ * Polling the poll context will poll all the attached poll objects and call
+ * their callbacks (handlers) if any of the socket events are set. This should
+ * be done within the main loop of an application.
+ *
+ * @{
+ */
+
/** global poll context used for blocking operations */
static ssh_poll_ctx global_poll_ctx;
@@ -628,3 +645,7 @@ void ssh_free_global_poll_ctx(){
global_poll_ctx=NULL;
}
}
+
+/* @} */
+
+/* vim: set ts=4 sw=4 et cindent: */