]> Pileus Git - ~andy/fetchmail/blobdiff - socket.h
Add a SockTimeout(int socket, int seconds) function.
[~andy/fetchmail] / socket.h
index 81b56c0690c40146a2d3edbfd99de523435eb33e..cbdeec06c51f4c3c4b8519be22ab2e0e8e1f237b 100644 (file)
--- a/socket.h
+++ b/socket.h
@@ -20,12 +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 **);
 
-/** Returns 1 if socket \a fd is OK, 0 if it isn't select()able
- * on - probably because it's been closed. You should
- * always check this function before passing stuff to the
- * select()-based waiter, as otherwise it may loop. 
- */
-int SockCheckOpen(int fd);
+/** 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).