diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-06 14:46:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-06 14:46:07 +0000 |
| commit | f8678dcae5f90eb946ad6e51d9a62e0c02bc63e3 (patch) | |
| tree | 186c3938bbccfae5e83f52354b74911d0aa50de4 /src/lib/server.h | |
| parent | 8cc0d5e6eceeafaeba2490e941b1ff73230aa4e5 (diff) | |
| parent | 4782e1c0beec98560950a616902669f09a98faae (diff) | |
Merge branch '1.0' of /home/carl/git/dvdomatic into 1.0
Diffstat (limited to 'src/lib/server.h')
| -rw-r--r-- | src/lib/server.h | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/lib/server.h b/src/lib/server.h index 77b51d079..68de3c2f0 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -94,19 +94,36 @@ private: class Server : public boost::noncopyable { public: - Server (boost::shared_ptr<Log> log); + Server (boost::shared_ptr<Log> log, bool verbose); void run (int num_threads); private: void worker_thread (); - int process (boost::shared_ptr<Socket> socket); + int process (boost::shared_ptr<Socket> socket, struct timeval &, struct timeval &); + void broadcast_thread (); + void broadcast_received (); std::vector<boost::thread *> _worker_threads; std::list<boost::shared_ptr<Socket> > _queue; boost::mutex _worker_mutex; boost::condition _worker_condition; boost::shared_ptr<Log> _log; + bool _verbose; + + struct Broadcast { + + Broadcast () + : thread (0) + , socket (0) + {} + + boost::thread* thread; + boost::asio::ip::udp::socket* socket; + char buffer[64]; + boost::asio::ip::udp::endpoint send_endpoint; + + } _broadcast; }; #endif |
