| 153 | } |
| 154 | |
| 155 | void I2PControlService::Accept () |
| 156 | { |
| 157 | if (m_Acceptor) |
| 158 | { |
| 159 | auto newSocket = std::make_shared<boost::asio::ssl::stream<boost::asio::ip::tcp::socket> > (m_Service, m_SSLContext); |
| 160 | m_Acceptor->async_accept (newSocket->lowest_layer(), |
| 161 | [this, newSocket](const boost::system::error_code& ecode) |
| 162 | { |
| 163 | HandleAccepted (ecode, newSocket); |
| 164 | }); |
| 165 | } |
| 166 | #if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS) |
| 167 | else if (m_LocalAcceptor) |
| 168 | { |
| 169 | auto newSocket = std::make_shared<boost::asio::ssl::stream<boost::asio::local::stream_protocol::socket> > (m_Service, m_SSLContext); |
| 170 | m_LocalAcceptor->async_accept (newSocket->lowest_layer(), |
| 171 | [this, newSocket](const boost::system::error_code& ecode) |
| 172 | { |
| 173 | HandleAccepted (ecode, newSocket); |
| 174 | }); |
| 175 | } |
| 176 | #endif |
| 177 | } |
| 178 | |
| 179 | template<typename ssl_socket> |
| 180 | void I2PControlService::HandleAccepted (const boost::system::error_code& ecode, |
nothing calls this directly
no outgoing calls
no test coverage detected