Mercurial > hg > index.fcgi > gift-gnutella > gift-gnutella-0.0.11-1pba
comparison src/io/tx_stack.h @ 0:d39e1d0d75b6
initial add
author | paulo@hit-nxdomain.opendns.com |
---|---|
date | Sat, 20 Feb 2010 21:18:28 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:ef2a46bce42c |
---|---|
1 /* | |
2 * $Id: tx_stack.h,v 1.6 2004/04/17 06:07:33 hipnod Exp $ | |
3 * | |
4 * Copyright (C) 2003 giFT project (gift.sourceforge.net) | |
5 * | |
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, or (at your option) any | |
9 * later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 */ | |
16 | |
17 #ifndef GIFT_GT_TX_STACK_H_ | |
18 #define GIFT_GT_TX_STACK_H_ | |
19 | |
20 /*****************************************************************************/ | |
21 | |
22 typedef struct gt_tx_stack GtTxStack; | |
23 | |
24 typedef void (*GtTxStackCleanup) (GtTxStack *stack, void *udata); | |
25 | |
26 struct gt_tx_stack | |
27 { | |
28 struct tx_layer *layers; | |
29 GtTxStackCleanup cleanup; | |
30 | |
31 TCPC *c; | |
32 void *udata; | |
33 | |
34 time_t start_time; | |
35 }; | |
36 | |
37 /*****************************************************************************/ | |
38 | |
39 GtTxStack *gt_tx_stack_new (TCPC *c, BOOL tx_deflated); | |
40 void gt_tx_stack_free (GtTxStack *stack); | |
41 | |
42 void gt_tx_stack_abort (GtTxStack *stack); | |
43 | |
44 void gt_tx_stack_set_handler (GtTxStack *stack, | |
45 GtTxStackCleanup cleanup, | |
46 void *udata); | |
47 | |
48 BOOL gt_tx_stack_queue (GtTxStack *stack, const uint8_t *data, | |
49 size_t len); | |
50 | |
51 /* used by tx_link to send data on the connection...argh, i can't | |
52 * come up with a good interface for this */ | |
53 int gt_tx_stack_send (GtTxStack *stack, const uint8_t *data, | |
54 size_t len); | |
55 | |
56 /*****************************************************************************/ | |
57 | |
58 #endif /* GIFT_GT_TX_STACK_H_ */ |