summaryrefslogtreecommitdiffstats
path: root/src/TcpSocket.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-06-02 15:02:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-06-02 15:02:56 +0200
commit7610a41afe910df6426aa09eae5aad7431d69e36 (patch)
tree1b86d67a4230819a5f4ee8ef1e92e2ee70d57f09 /src/TcpSocket.h
parent8bd4a04c4098e1dfe75f8056d4ff5a125d445275 (diff)
downloaddabmux-7610a41afe910df6426aa09eae5aad7431d69e36.tar.gz
dabmux-7610a41afe910df6426aa09eae5aad7431d69e36.tar.bz2
dabmux-7610a41afe910df6426aa09eae5aad7431d69e36.zip
TCP output: do not block in the destructor if one connection stalls
Diffstat (limited to 'src/TcpSocket.h')
-rw-r--r--src/TcpSocket.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/TcpSocket.h b/src/TcpSocket.h
index 660515d..9ff09e5 100644
--- a/src/TcpSocket.h
+++ b/src/TcpSocket.h
@@ -2,7 +2,7 @@
Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Her Majesty the Queen in
Right of Canada (Communications Research Center Canada)
- Copyright (C) 2016
+ Copyright (C) 2017
Matthias P. Braendli, matthias.braendli@mpb.li
http://www.opendigitalradio.org
@@ -77,9 +77,10 @@ class TcpSocket
/** Send data over the TCP connection.
* @param data The buffer that will be sent.
* @param size Number of bytes to send.
+ * @param timeout_ms number of milliseconds before timeout
* return number of bytes sent or -1 if error
*/
- ssize_t send(const void* data, size_t size);
+ ssize_t send(const void* data, size_t size, int timeout_ms=0);
/** Receive data from the socket.
* @param data The buffer that will receive data.