diff options
Diffstat (limited to 'libglouglou/sendbuf.h')
-rw-r--r-- | libglouglou/sendbuf.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libglouglou/sendbuf.h b/libglouglou/sendbuf.h new file mode 100644 index 0000000..90dc4bc --- /dev/null +++ b/libglouglou/sendbuf.h @@ -0,0 +1,21 @@ +#include <event.h> + +struct sendbuf { + struct event_base *ev_base; + struct event *ev_timer; + struct timeval ev_timer_tv; + int sndbuf_max; + int msec_max; + int (*send_func)(void *, int, void *); + void *usrdata; + void *buffer; + int buffer_size; + int buffer_pos; + int flushing; + int flushed_len; +}; + +struct sendbuf *sendbuf_init(struct event_base *, int, int, + int (*send_func)(void *, int, void *), void *); +void sendbuf_shutdown(struct sendbuf *); +void *sendbuf_gettoken(struct sendbuf *, int); |