diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:24:09 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:24:09 +0100 |
commit | 04e1872b5373a4b0bde548e9e42a6c2fc74c7e5d (patch) | |
tree | 545756853af063238b61e86c6166f895cf3cda0f /lib/Socket.h | |
parent | 425d891ad3d04085d9e16893d6e5e580eb68982b (diff) | |
download | dabmod-04e1872b5373a4b0bde548e9e42a6c2fc74c7e5d.tar.gz dabmod-04e1872b5373a4b0bde548e9e42a6c2fc74c7e5d.tar.bz2 dabmod-04e1872b5373a4b0bde548e9e42a6c2fc74c7e5d.zip |
common 81f518d: TCPSocket: let recv throw Interrupted on EINTR
Diffstat (limited to 'lib/Socket.h')
-rw-r--r-- | lib/Socket.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Socket.h b/lib/Socket.h index 8c6f8a9..8881be3 100644 --- a/lib/Socket.h +++ b/lib/Socket.h @@ -180,12 +180,12 @@ class TCPSocket { */ ssize_t send(const void* data, size_t size, int timeout_ms=0); - /* Returns number of bytes read, 0 on disconnect. Throws a - * runtime_error on error */ + class Interrupted {}; + /* Returns number of bytes read, 0 on disconnect. + * Throws Interrupted on EINTR, runtime_error on error */ ssize_t recv(void *buffer, size_t length, int flags); class Timeout {}; - class Interrupted {}; /* Returns number of bytes read, 0 on disconnect or refused connection. * Throws a Timeout on timeout, Interrupted on EINTR, a runtime_error * on error |