X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Flib%2Fnanomsg.h;h=e3e917c4b67f8d625a6c28b51454b1afbba2f1af;hp=9bd87098b4814465fd4773a876fb0ef5566464c0;hb=33e13c4053138930f4b2f59349e441c76111059d;hpb=e573f4fa173608dcb7ca23f543b49d5be26a8226 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 + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,22 +18,26 @@ */ + #include #include #include -#include -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.