view src/lib/istream-timeout.h @ 17189:b1a756176ed2

Added istream-timeout, which triggers I/O event and fails with ETIMEDOUT after the timeout.
author Timo Sirainen <tss@iki.fi>
date Thu, 03 Apr 2014 19:53:13 +0300
parents
children
line wrap: on
line source

#ifndef ISTREAM_TIMEOUT_H
#define ISTREAM_TIMEOUT_H

/* Return ETIMEDOUT error if read() doesn't return anything for timeout_msecs.
   If timeout_msecs=0, there is no timeout. */
struct istream *
i_stream_create_timeout(struct istream *input, unsigned int timeout_msecs);

#endif