Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/common/tio.h
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2012-04-26 21:42:22 +0200
committerArthur de Jong <arthur@arthurdejong.org>2012-04-26 21:42:22 +0200
commit9ee0a776cab9a54e3a55525be79bb7c50b215841 (patch)
tree4a62d26e97d8cd0a22a706bff012220850c4de45 /common/tio.h
parent05c17536eaef591f6c36e1a89f8332faa6635a34 (diff)
split the functionality to read everything from the stream into a separate function and don't assume we use non-blocking IO (fix r1637)
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-pam-ldapd@1659 ef36b2f9-881f-0410-afb5-c4e39611909c
Diffstat (limited to 'common/tio.h')
-rw-r--r--common/tio.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/tio.h b/common/tio.h
index 832367b..59f26df 100644
--- a/common/tio.h
+++ b/common/tio.h
@@ -56,11 +56,12 @@ TFILE *tio_fdopen(int fd,struct timeval *readtimeout,struct timeval *writetimeou
/* Read the specified number of bytes from the stream. */
int tio_read(TFILE *fp,void *buf,size_t count);
-/* Read and discard the specified number of bytes from the stream.
- If count is 0 reads and discards any data that can be read and empties
- the read buffer. */
+/* Read and discard the specified number of bytes from the stream. */
int tio_skip(TFILE *fp,size_t count);
+/* Read all available data from the stream and empty the read buffer. */
+int tio_skipall(TFILE *fp);
+
/* Write the specified buffer to the stream. */
int tio_write(TFILE *fp,const void *buf,size_t count);