Read UTF8 string lengths correctly when checking closed captions (part of #1446).
[dcpomatic.git] / src / lib / server.h
index a72d360261123641f5e21763c18bd3dd552482af..59722274ee17b186d50a34f35df91182d7fbd411 100644 (file)
@@ -31,10 +31,11 @@ class Socket;
 class Server : public boost::noncopyable
 {
 public:
-       Server (int port);
+       explicit Server (int port, int timeout = 30);
        virtual ~Server ();
 
        virtual void run ();
+       void stop ();
 
 protected:
        boost::mutex _mutex;
@@ -48,6 +49,7 @@ private:
 
        boost::asio::io_service _io_service;
        boost::asio::ip::tcp::acceptor _acceptor;
+       int _timeout;
 };
 
 #endif