diff options
author | Jan Hutter <jhutter@hsr.ch> | 2005-12-06 16:04:39 +0000 |
---|---|---|
committer | Jan Hutter <jhutter@hsr.ch> | 2005-12-06 16:04:39 +0000 |
commit | f1046648362e045781ad7eee6f821d0675178b80 (patch) | |
tree | 89d5e55a82da7660ead538148cd10cd786680d9f /Source/charon/threads | |
parent | 2b547481315c3b641b716023858efdbb2c3e422a (diff) | |
download | strongswan-f1046648362e045781ad7eee6f821d0675178b80.tar.bz2 strongswan-f1046648362e045781ad7eee6f821d0675178b80.tar.xz |
- code cleaned up
Diffstat (limited to 'Source/charon/threads')
-rw-r--r-- | Source/charon/threads/receiver.h | 3 | ||||
-rw-r--r-- | Source/charon/threads/sender.c | 19 | ||||
-rw-r--r-- | Source/charon/threads/sender.h | 11 |
3 files changed, 19 insertions, 14 deletions
diff --git a/Source/charon/threads/receiver.h b/Source/charon/threads/receiver.h index a7269b73f..415ea5191 100644 --- a/Source/charon/threads/receiver.h +++ b/Source/charon/threads/receiver.h @@ -25,13 +25,14 @@ #include <types.h> + typedef struct receiver_t receiver_t; /** * @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 + * data is available, a packet_t object is created , wrapped * in an incoming_packet_job_t and added to the job queue. * * @ingroup threads diff --git a/Source/charon/threads/sender.c b/Source/charon/threads/sender.c index cb33d8405..3719c6b6c 100644 --- a/Source/charon/threads/sender.c +++ b/Source/charon/threads/sender.c @@ -32,38 +32,39 @@ #include <utils/allocator.h> #include <utils/logger_manager.h> + typedef struct private_sender_t private_sender_t; /** - * Private data of a sender object + * Private data of a sender_t object. */ struct private_sender_t { /** - * Public part of a sender object + * Public part of a sender_t object. */ sender_t public; /** - * Assigned thread to the sender_t object + * Assigned thread. */ pthread_t assigned_thread; /** - * @brief The threads function, sends out packets. + * @brief The thread function, sends out packets. * - * @param this assigned sender object + * @param this calling object */ void (*send_packets) (private_sender_t * this); /** - * logger for this sender + * A logger for this sender_t object. */ logger_t *logger; }; /** - * implements private_sender_t.send_packets + * Implementation of private_sender_t.send_packets. */ static void send_packets(private_sender_t * this) { @@ -90,7 +91,7 @@ static void send_packets(private_sender_t * this) } /** - * implements sender_t.destroy + * Implementation of sender_t.destroy. */ static void destroy(private_sender_t *this) { @@ -106,7 +107,7 @@ static void destroy(private_sender_t *this) } /* - * see header + * Described in header. */ sender_t * sender_create() { diff --git a/Source/charon/threads/sender.h b/Source/charon/threads/sender.h index 1192ef76e..ea8124147 100644 --- a/Source/charon/threads/sender.h +++ b/Source/charon/threads/sender.h @@ -28,16 +28,19 @@ typedef struct sender_t sender_t; /** - * @brief Sends packets over the socket. + * @brief Thread responsible for sending packets over the socket. + * + * @b Constructors: + * - sender_create() * * @ingroup threads */ struct sender_t { /** - * @brief Destroys a sender object + * @brief Destroys a sender object. * - * @param sender sender object + * @param sender calling object */ void (*destroy) (sender_t *sender); }; @@ -50,7 +53,7 @@ struct sender_t { * from the send queue and sends them out. * * @return - * - created sender_t, or + * - sender_t object * - NULL of thread could not be started * * @ingroup threads |