diff options
author | Simon Rettberg | 2015-12-01 13:38:10 +0100 |
---|---|---|
committer | Simon Rettberg | 2015-12-01 13:38:10 +0100 |
commit | ecc6e5dd28821bf1c207e074f1b5903426a7e4c4 (patch) | |
tree | 5f9d8f8ffbcad5ae6ac1b9a0b3075155995537d8 /src/shared/sockhelper.h | |
parent | [FUSE] It works! Kinda... (diff) | |
download | dnbd3-ecc6e5dd28821bf1c207e074f1b5903426a7e4c4.tar.gz dnbd3-ecc6e5dd28821bf1c207e074f1b5903426a7e4c4.tar.xz dnbd3-ecc6e5dd28821bf1c207e074f1b5903426a7e4c4.zip |
[FUSE] Stability improvements, runs for longer than a couple secs now :)
Diffstat (limited to 'src/shared/sockhelper.h')
-rw-r--r-- | src/shared/sockhelper.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/sockhelper.h b/src/shared/sockhelper.h index dc22e2b..6ffc31a 100644 --- a/src/shared/sockhelper.h +++ b/src/shared/sockhelper.h @@ -90,6 +90,11 @@ bool sock_append(poll_list_t *list, const int sock, bool wantRead, bool wantWrit * Give up after calling write() maxtries times. * Set maxtries < 0 to try infinitely. */ -ssize_t sock_sendAll(int sock, void *buffer, size_t len, int maxtries); +ssize_t sock_sendAll(const int sock, void *buffer, const size_t len, int maxtries); + +/** + * Send given buffer, repeatedly calling recv on partial send or EINTR. + */ +ssize_t sock_recv(const int sock, void *buffer, const size_t len); #endif /* SOCKHELPER_H_ */ |