2 * Copyright (C) 2005-2007 Martin Willi
3 * Copyright (C) 2005 Jan Hutter
4 * Hochschule fuer Technik Rapperswil
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the
8 * Free Software Foundation; either version 2 of the License, or (at your
9 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
18 * @defgroup sender sender
25 typedef struct sender_t sender_t
;
28 #include <network/packet.h>
31 * Thread responsible for sending packets over the socket.
36 * Send a packet over the network.
38 * This function is non blocking and adds the packet to a queue.
39 * Whenever the sender thread thinks it's good to send the packet,
42 * @param packet packet to send
44 void (*send
) (sender_t
*this, packet_t
*packet
);
47 * Destroys a sender object.
49 void (*destroy
) (sender_t
*this);
53 * Create the sender thread.
55 * The thread will start to work, getting packets
56 * from its queue and sends them out.
58 * @return created sender object
60 sender_t
* sender_create(void);
62 #endif /** SENDER_H_ @}*/