diff options
author | Timo Teras <timo.teras@iki.fi> | 2009-11-25 16:53:02 +0200 |
---|---|---|
committer | Timo Teras <timo.teras@iki.fi> | 2009-11-25 16:53:02 +0200 |
commit | 4db830052d941d9c6de281bc9a2f6ac212c59ad8 (patch) | |
tree | 3a9b5e7c78a812fc582f8844703069e5692a0c94 /include/libtf/io.h | |
parent | 2b19cc385163a43b1d559074a795a8aaab751185 (diff) | |
download | libtf-4db830052d941d9c6de281bc9a2f6ac212c59ad8.tar.bz2 libtf-4db830052d941d9c6de281bc9a2f6ac212c59ad8.tar.xz |
libtf: minor changes and new test case for network i/o
fixup the internals a bit.
Diffstat (limited to 'include/libtf/io.h')
-rw-r--r-- | include/libtf/io.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/libtf/io.h b/include/libtf/io.h index 8f5b54d..38dd541 100644 --- a/include/libtf/io.h +++ b/include/libtf/io.h @@ -52,8 +52,10 @@ void tf_poll_close(void); int tf_open_fd(struct tf_fd *fd, int kfd, int flags); int tf_open(struct tf_fd *fd, const char *pathname, int flags); int tf_close(struct tf_fd *fd); -int tf_read(struct tf_fd *fd, void *buf, size_t count, tf_mtime_diff_t timeout); -int tf_write(struct tf_fd *fd, const void *buf, size_t count, tf_mtime_diff_t timeout); +ssize_t tf_read(struct tf_fd *fd, void *buf, size_t count, tf_mtime_diff_t timeout); +ssize_t tf_write(struct tf_fd *fd, const void *buf, size_t count, tf_mtime_diff_t timeout); +int tf_read_fully(struct tf_fd *fd, void *buf, size_t count, tf_mtime_diff_t timeout); +int tf_write_fully(struct tf_fd *fd, const void *buf, size_t count, tf_mtime_diff_t timeout); int tf_socket(struct tf_fd *fd, int domain, int type, int protocol); int tf_bind(struct tf_fd *fd, const struct tf_sockaddr *addr); |