aboutsummaryrefslogtreecommitdiffstats
path: root/socket.h
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2011-04-29 15:08:49 +0200
committerMatthias Andree <matthias.andree@gmx.de>2011-04-29 16:54:13 +0200
commit72ce8bce8dd655b6aefa33d0a74e883dad5202b5 (patch)
tree711c204306cdcd69ee14d7f29fbfdf597a19b96f /socket.h
parentab7a12a1c5b074b0ccfeb7f4a43ed71d5bb36175 (diff)
downloadfetchmail-72ce8bce8dd655b6aefa33d0a74e883dad5202b5.tar.gz
fetchmail-72ce8bce8dd655b6aefa33d0a74e883dad5202b5.tar.bz2
fetchmail-72ce8bce8dd655b6aefa33d0a74e883dad5202b5.zip
Add a SockTimeout(int socket, int seconds) function.
Uses setsockopt(..., SOL_SOCKET, SO_{SND|RCV}TIMEO, ...).
Diffstat (limited to 'socket.h')
-rw-r--r--socket.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/socket.h b/socket.h
index 0c4ac001..cbdeec06 100644
--- a/socket.h
+++ b/socket.h
@@ -20,6 +20,9 @@ struct addrinfo;
/** Create a new client socket; returns -1 on error */
int SockOpen(const char *host, const char *service, const char *plugin, struct addrinfo **);
+/** Sets the send/receive timeouts for socket \a sock to \a timeout
+ * seconds. \return zero on success. */
+int SockTimeout(int sock, int timeout);
/**
Get a string terminated by an '\n' (matches interface of fgets).