diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:25:09 +0100 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2020-10-28 11:25:09 +0100 |
commit | 69d683e8720996c571c11b6f90e008682d0f95fb (patch) | |
tree | d652b87d0ca2ca6938a9f6dc54448e10150af17d /contrib/Socket.h | |
parent | dc959aa6b105056cafc9e6f98b84c8abda309ca8 (diff) | |
download | ODR-AudioEnc-69d683e8720996c571c11b6f90e008682d0f95fb.tar.gz ODR-AudioEnc-69d683e8720996c571c11b6f90e008682d0f95fb.tar.bz2 ODR-AudioEnc-69d683e8720996c571c11b6f90e008682d0f95fb.zip |
common 81f518d: TCPSocket: let recv throw Interrupted on EINTR
Diffstat (limited to 'contrib/Socket.h')
-rw-r--r-- | contrib/Socket.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/Socket.h b/contrib/Socket.h index 8c6f8a9..8881be3 100644 --- a/contrib/Socket.h +++ b/contrib/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 |