summaryrefslogtreecommitdiffstats
path: root/src/UdpSocket.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-04 14:27:50 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-11-04 14:27:50 +0100
commit51491533a312884862849082b3507e49c1829d22 (patch)
tree09afd1164350517eeacb53254b33db4249b1e41b /src/UdpSocket.h
parent7068a697b235f1ae05bc1a5cf93e7eeefbe7a1df (diff)
downloaddabmux-51491533a312884862849082b3507e49c1829d22.tar.gz
dabmux-51491533a312884862849082b3507e49c1829d22.tar.bz2
dabmux-51491533a312884862849082b3507e49c1829d22.zip
Add new UDP input
Diffstat (limited to 'src/UdpSocket.h')
-rw-r--r--src/UdpSocket.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/UdpSocket.h b/src/UdpSocket.h
index 535499e..dfeaac1 100644
--- a/src/UdpSocket.h
+++ b/src/UdpSocket.h
@@ -80,6 +80,15 @@ class UdpSocket
UdpSocket(const UdpSocket& other) = delete;
const UdpSocket& operator=(const UdpSocket& other) = delete;
+ /** reinitialise socket. Close the already open socket, and
+ * create a new one
+ */
+ int reinit(int port, const std::string& name);
+
+ /** Close the socket
+ */
+ int close(void);
+
/** Send an UDP packet.
* @param packet The UDP packet to be sent. It includes the data and the
* destination address
@@ -111,7 +120,6 @@ class UdpSocket
int setBlocking(bool block);
protected:
- int init_sock(int port, const std::string& name);
/// The address on which the socket is bound.
InetAddress address;