summaryrefslogtreecommitdiffstats
path: root/lib/Socket.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 07:11:18 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2020-11-02 07:11:18 +0100
commitcdeb33e3152caf5d73f6d75a16a26ecd2aec8260 (patch)
treeea86107469dd3b088bc22cb358a6b9b3eb3c37ae /lib/Socket.h
parent54549c6c08494781aec262987411fe3a354ffd73 (diff)
downloaddabmux-cdeb33e3152caf5d73f6d75a16a26ecd2aec8260.tar.gz
dabmux-cdeb33e3152caf5d73f6d75a16a26ecd2aec8260.tar.bz2
dabmux-cdeb33e3152caf5d73f6d75a16a26ecd2aec8260.zip
Common 81f518d: TCPSocket: let recv throw Interrupted on EINTR
Diffstat (limited to 'lib/Socket.h')
-rw-r--r--lib/Socket.h6
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