diff options
author | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-05-15 16:36:15 +0200 |
---|---|---|
committer | Lars-Dominik Braun <PromyLOPh@lavabit.com> | 2009-05-15 16:36:15 +0200 |
commit | 1a6b21e0c79e6abe20708b6ce7a8bd37b8b6c188 (patch) | |
tree | cfababfac2868d5d421ab003951d5429e31504d8 /libwaitress/src/waitress.h | |
parent | 363bb5d195e0c74238af947c009e5efcb89d0cab (diff) | |
download | pianobar-1a6b21e0c79e6abe20708b6ce7a8bd37b8b6c188.tar.gz pianobar-1a6b21e0c79e6abe20708b6ce7a8bd37b8b6c188.tar.bz2 pianobar-1a6b21e0c79e6abe20708b6ce7a8bd37b8b6c188.zip |
waitress: Add timeouts
read() and write() may time out now. Implemented using non-blocking
sockets and poll (). Default timeout: 30 seconds.
Diffstat (limited to 'libwaitress/src/waitress.h')
-rw-r--r-- | libwaitress/src/waitress.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libwaitress/src/waitress.h b/libwaitress/src/waitress.h index cc999b3..b05d786 100644 --- a/libwaitress/src/waitress.h +++ b/libwaitress/src/waitress.h @@ -48,13 +48,14 @@ typedef struct { /* extra data handed over to callback function */ void *data; char (*callback) (void *, size_t, void *); + int socktimeout; } WaitressHandle_t; typedef enum {WAITRESS_RET_ERR = 0, WAITRESS_RET_OK, WAITRESS_RET_STATUS_UNKNOWN, WAITRESS_RET_NOTFOUND, WAITRESS_RET_FORBIDDEN, WAITRESS_RET_CONNECT_REFUSED, WAITRESS_RET_SOCK_ERR, WAITRESS_RET_GETADDR_ERR, WAITRESS_RET_CB_ABORT, WAITRESS_RET_HDR_OVERFLOW, - WAITRESS_RET_PARTIAL_FILE} WaitressReturn_t; + WAITRESS_RET_PARTIAL_FILE, WAITRESS_RET_TIMEOUT} WaitressReturn_t; void WaitressInit (WaitressHandle_t *); void WaitressFree (WaitressHandle_t *); |