diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-11-05 18:00:58 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-11-05 18:00:58 +0000 |
| commit | 5698918140d640b3477634504a83da0d8d71a1cf (patch) | |
| tree | 2afe42950d579e53048318db7bf20dd034d4295a /src/lib/server.h | |
| parent | 82caed54938683d8112615c8e65fa1456f1130ee (diff) | |
Oops; server should be listening from requests from the client; basic set-up.
Diffstat (limited to 'src/lib/server.h')
| -rw-r--r-- | src/lib/server.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/server.h b/src/lib/server.h index 77b51d079..55d107545 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -101,12 +101,28 @@ public: private: void worker_thread (); int process (boost::shared_ptr<Socket> socket); + 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; + + 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 |
