]>
git.ipfire.org Git - thirdparty/strongswan.git/blob - src/charon/network/sender.h
4 * @brief Interface of sender_t.
9 * Copyright (C) 2005-2007 Martin Willi
10 * Copyright (C) 2005 Jan Hutter
11 * Hochschule fuer Technik Rapperswil
13 * This program is free software; you can redistribute it and/or modify it
14 * under the terms of the GNU General Public License as published by the
15 * Free Software Foundation; either version 2 of the License, or (at your
16 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
20 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27 typedef struct sender_t sender_t
;
30 #include <network/packet.h>
33 * @brief Thread responsible for sending packets over the socket.
43 * @brief Send a packet over the network.
45 * This function is non blocking and adds the packet to a queue.
46 * Whenever the sender thread things it's good to send the packet,
49 * @param this calling object
50 * @param packet packet to send
52 void (*send
) (sender_t
*this, packet_t
*packet
);
55 * @brief Destroys a sender object.
57 * @param this calling object
59 void (*destroy
) (sender_t
*this);
63 * @brief Create the sender thread.
65 * The thread will start to work, getting packets
66 * from its queue and sends them out.
68 * @return created sender object
72 sender_t
* sender_create(void);