2 * copyright (c) 2010 Sveriges Television AB <info@casparcg.com>
4 * This file is part of CasparCG.
6 * CasparCG is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * CasparCG is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with CasparCG. If not, see <http://www.gnu.org/licenses/>.
21 // AsyncEventServer.h: interface for the AsyncServer class.
22 //////////////////////////////////////////////////////////////////////
25 #include "protocol_strategy.h"
27 #include <common/memory.h>
29 #include <boost/asio.hpp>
30 #include <boost/noncopyable.hpp>
32 namespace caspar { namespace IO {
34 typedef std::function<std::pair<std::wstring, std::shared_ptr<void>> (const std::string& ipv4_address)>
37 class AsyncEventServer : boost::noncopyable
40 explicit AsyncEventServer(
41 std::shared_ptr<boost::asio::io_service> service, const protocol_strategy_factory<char>::ptr& protocol, unsigned short port);
44 void add_client_lifecycle_object_factory(const lifecycle_factory_t& lifecycle_factory);
46 struct implementation;
48 spl::shared_ptr<implementation> impl_;