/* * Copyright (c) 2010 Remko Tronçon * Licensed under the GNU General Public License v3. * See Documentation/Licenses/GPLv3.txt for more information. */ #pragma once #include #include #include #include #include #include #include #include namespace Swift { class DummyConnectionServer : public ConnectionServer, public EventOwner, public boost::enable_shared_from_this { public: typedef boost::shared_ptr ref; enum Error { Conflict, UnknownError }; static ref create(EventLoop* eventLoop) { return ref(new DummyConnectionServer(eventLoop)); } void acceptConnection(boost::shared_ptr connection); virtual void start(); virtual void stop(); virtual HostAddressPort getAddressPort() const; private: DummyConnectionServer(EventLoop* eventLoop); private: HostAddress address_; EventLoop* eventLoop; }; }