]>
git.ipfire.org Git - people/ms/strongswan.git/blob - src/charon/charon/threads/receiver.h
4 * @brief Interface of receiver_t.
9 * Copyright (C) 2005 Jan Hutter, Martin Willi
10 * Hochschule fuer Technik Rapperswil
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
19 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
29 typedef struct receiver_t receiver_t
;
32 * @brief Receives packets from the socket and adds them to the job queue.
34 * The receiver starts a thread, wich reads on the blocking socket. If
35 * data is available, a packet_t object is created , wrapped
36 * in an incoming_packet_job_t and added to the job queue.
46 * @brief Destroys a receiver_t object.
48 * @param receiver receiver object
50 void (*destroy
) (receiver_t
*receiver
);
54 * @brief Create a receiver_t object.
56 * The receiver thread will start working, get data
57 * from the socket and add those packets to the job queue.
61 * - NULL of thread could not be started
65 receiver_t
* receiver_create(void);
67 #endif /*RECEIVER_H_*/