diff options
author | Russ Allbery <rra@stanford.edu> | 2012-02-19 10:45:57 -0800 |
---|---|---|
committer | Russ Allbery <rra@stanford.edu> | 2012-02-19 10:45:57 -0800 |
commit | 21b7b70dc1a0255315ba297745e6d3f56e9e7c68 (patch) | |
tree | 7c31279138ebbc9e6597d316bd0c75c53a8ec66b /util | |
parent | e359d9e9c343dc1344aa87306a02616b8bbf58b2 (diff) |
Document that network_write manipulates non-blocking status
Change-Id: I7131daf0387b2fabb05fdb237ac7fae7cdaac5b6
Diffstat (limited to 'util')
-rw-r--r-- | util/network.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/network.h b/util/network.h index 0aeea53..f04a65c 100644 --- a/util/network.h +++ b/util/network.h @@ -111,6 +111,10 @@ socket_type network_client_create(int domain, int type, const char *source); * Read or write the specified number of bytes to the network, enforcing a * timeout. Both return true on success and false on failure; on failure, the * socket errno is set. + * + * network_write will set the file descriptor non-blocking and then set it + * back to blocking at the conclusion of the write, so don't use this function + * with file descriptors that should stay non-blocking. */ bool network_read(socket_type, void *, size_t, time_t) __attribute__((__nonnull__)); |