/* * Copyright (c) 2010-2013 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 namespace Swift { class SOCKS5BytestreamServerSession; class CryptoProvider; class SOCKS5BytestreamServer { public: SOCKS5BytestreamServer( boost::shared_ptr connectionServer, SOCKS5BytestreamRegistry* registry); HostAddressPort getAddressPort() const; void start(); void stop(); std::vector< boost::shared_ptr > getSessions(const std::string& id) const; private: void handleNewConnection(boost::shared_ptr connection); void handleSessionFinished(boost::shared_ptr); private: friend class SOCKS5BytestreamServerSession; boost::shared_ptr connectionServer; SOCKS5BytestreamRegistry* registry; std::vector > sessions; }; }