aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads/receiver.h
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2005-11-25 13:42:58 +0000
committerMartin Willi <martin@strongswan.org>2005-11-25 13:42:58 +0000
commitca76df97365ec3421719bfbf9ecd3f33939ad108 (patch)
tree98f14e2944590fd642f3bfab0e03000ed64cde65 /Source/charon/threads/receiver.h
parent2a336de4cd0d2f9cbb2547dbe7b4ff278446b89a (diff)
downloadstrongswan-ca76df97365ec3421719bfbf9ecd3f33939ad108.tar.bz2
strongswan-ca76df97365ec3421719bfbf9ecd3f33939ad108.tar.xz
- documentation and cleanup of threads package
Diffstat (limited to 'Source/charon/threads/receiver.h')
-rw-r--r--Source/charon/threads/receiver.h30
1 files changed, 24 insertions, 6 deletions
diff --git a/Source/charon/threads/receiver.h b/Source/charon/threads/receiver.h
index 2f330adbf..9b02165d3 100644
--- a/Source/charon/threads/receiver.h
+++ b/Source/charon/threads/receiver.h
@@ -1,7 +1,7 @@
/**
* @file receiver.h
*
- * @brief Implements the Receiver Thread encapsulated in the receiver_t object
+ * @brief Interface of receiver_t.
*
*/
@@ -28,20 +28,38 @@
typedef struct receiver_t receiver_t;
/**
- * @brief A Receiver object which receives packets on the socket and adds them to the job-queue
+ * @brief Receives packets from the socket and adds them to the job queue.
+ *
+ * The receiver starts a thread, wich reads on the blocking socket. If
+ * there is data available, a packet_t is created from the data, wrapped
+ * in an incoming_packet_job_t and added to the job queue.
+ *
+ * @ingroup threads
*/
struct receiver_t {
/**
- * @brief Destroys a receiver object
+ * @brief Destroys a receiver_t
*
- * @param receiver receiver object
- * @return SUCCESSFUL if succeeded, FAILED otherwise
+ * @param receiver receiver object
+ * @return
+ * - SUCCESS in any case
*/
status_t (*destroy) (receiver_t *receiver);
};
-
+/**
+ * @brief Create a receiver.
+ *
+ * The receiver thread will start working, get data
+ * from the socket and add those packets to the job queue.
+ *
+ * @return
+ * - created receiver_t, or
+ * - NULL of thread could not be started
+ *
+ * @ingroup threads
+ */
receiver_t * receiver_create();
#endif /*RECEIVER_H_*/