Replace std::shared_ptr<boost::asio::ip::tcp::acceptor> with Shared<boost::asio::ip::tcp::acceptor>::Ptr

This commit is contained in:
Alexander A. Klimov 2019-07-25 16:32:57 +02:00 committed by Michael Friedrich
parent 26ce2cfb73
commit a1fef92835
2 changed files with 4 additions and 3 deletions

View File

@ -364,7 +364,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
}
auto& io (IoEngine::Get().GetIoContext());
auto acceptor (std::make_shared<tcp::acceptor>(io));
auto acceptor (Shared<tcp::acceptor>::Make(io));
try {
tcp::resolver resolver (io);
@ -423,7 +423,7 @@ bool ApiListener::AddListener(const String& node, const String& service)
return true;
}
void ApiListener::ListenerCoroutineProc(boost::asio::yield_context yc, const std::shared_ptr<boost::asio::ip::tcp::acceptor>& server, const std::shared_ptr<boost::asio::ssl::context>& sslContext)
void ApiListener::ListenerCoroutineProc(boost::asio::yield_context yc, const Shared<boost::asio::ip::tcp::acceptor>::Ptr& server, const std::shared_ptr<boost::asio::ssl::context>& sslContext)
{
namespace asio = boost::asio;

View File

@ -10,6 +10,7 @@
#include "remote/messageorigin.hpp"
#include "base/configobject.hpp"
#include "base/process.hpp"
#include "base/shared.hpp"
#include "base/timer.hpp"
#include "base/workqueue.hpp"
#include "base/tcpsocket.hpp"
@ -152,7 +153,7 @@ private:
void NewClientHandler(boost::asio::yield_context yc, const Shared<AsioTlsStream>::Ptr& client, const String& hostname, ConnectionRole role);
void NewClientHandlerInternal(boost::asio::yield_context yc, const Shared<AsioTlsStream>::Ptr& client, const String& hostname, ConnectionRole role);
void ListenerCoroutineProc(boost::asio::yield_context yc, const std::shared_ptr<boost::asio::ip::tcp::acceptor>& server, const std::shared_ptr<boost::asio::ssl::context>& sslContext);
void ListenerCoroutineProc(boost::asio::yield_context yc, const Shared<boost::asio::ip::tcp::acceptor>::Ptr& server, const std::shared_ptr<boost::asio::ssl::context>& sslContext);
WorkQueue m_RelayQueue;
WorkQueue m_SyncQueue{0, 4};