| 1495 | } |
| 1496 | |
| 1497 | void SAMBridge::HandleAccept(const boost::system::error_code& ecode, std::shared_ptr<SAMSocket> socket) |
| 1498 | { |
| 1499 | if (!ecode) |
| 1500 | { |
| 1501 | boost::system::error_code ec; |
| 1502 | auto ep = socket->GetSocket ().remote_endpoint (ec); |
| 1503 | if (!ec) |
| 1504 | { |
| 1505 | LogPrint (eLogDebug, "SAM: New connection from ", ep); |
| 1506 | AddSocket (socket); |
| 1507 | socket->ReceiveHandshake (); |
| 1508 | } |
| 1509 | else |
| 1510 | LogPrint (eLogError, "SAM: Incoming connection error: ", ec.message ()); |
| 1511 | } |
| 1512 | else |
| 1513 | LogPrint (eLogError, "SAM: Accept error: ", ecode.message ()); |
| 1514 | |
| 1515 | if (ecode != boost::asio::error::operation_aborted) |
| 1516 | Accept (); |
| 1517 | } |
| 1518 | |
| 1519 | std::shared_ptr<SAMSession> SAMBridge::CreateSession (std::string_view id, SAMSessionType type, |
| 1520 | std::string_view destination, const i2p::util::Mapping& params) |
nothing calls this directly
no test coverage detected