summaryrefslogtreecommitdiff
path: root/src/lib/nanomsg.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-02-17 17:33:35 +0100
committerCarl Hetherington <cth@carlh.net>2021-02-17 17:33:35 +0100
commit33e13c4053138930f4b2f59349e441c76111059d (patch)
tree4a4da8c31d0a78bc11539ae89a5d67602cdcb913 /src/lib/nanomsg.h
parente573f4fa173608dcb7ca23f543b49d5be26a8226 (diff)
Assorted C++11 tidying.
Diffstat (limited to 'src/lib/nanomsg.h')
-rw-r--r--src/lib/nanomsg.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/nanomsg.h b/src/lib/nanomsg.h
index 9bd87098b..e3e917c4b 100644
--- a/src/lib/nanomsg.h
+++ b/src/lib/nanomsg.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -18,22 +18,26 @@
*/
+
#include <string>
#include <list>
#include <boost/optional.hpp>
-#include <boost/noncopyable.hpp>
-class Nanomsg : public boost::noncopyable
+
+class Nanomsg
{
public:
explicit Nanomsg (bool server);
+ NanoMsg (Nanomsg const&) = delete;
+ NanoMsg& operator= (Nanomsg const&) = delete;
+
/** Try to send a message, waiting for some timeout before giving up.
* @param timeout Timeout in milliseconds, or -1 for infinite timeout.
* @return true if the send happened, false if there was a timeout.
*/
bool send (std::string s, int timeout);
-
+
/** Try to receive a message, waiting for some timeout before giving up.
* @param timeout Timeout in milliseconds, or -1 for infinite timeout.
* @return Empty if the timeout was reached, otherwise the received string.