peer connection: pass ioContext, logger

Change-Id: Ifb0a3a3a408d8ec7bd001c960315cf2e6d6ad0df
diff --git a/src/peer_connection.cpp b/src/peer_connection.cpp
index 42bfbc0..c1bf14e 100644
--- a/src/peer_connection.cpp
+++ b/src/peer_connection.cpp
@@ -162,6 +162,7 @@
 
     Impl(std::unique_ptr<IceSocketEndpoint>&& ep,
          tls::CertificateStore& certStore,
+         const std::shared_ptr<asio::io_context>& ioContext,
          const dht::crypto::Certificate& peer_cert,
          const Identity& local_identity,
          const std::shared_future<tls::DhParams>& dh_params)
@@ -188,12 +189,15 @@
             /*.certStore = */ certStore,
             /*.timeout = */ TLS_TIMEOUT,
             /*.cert_check = */ nullptr,
+            /*.io_context = */ ioContext,
+            /* .logger = */ ep->underlyingICE()->logger()
         };
         tls = std::make_unique<tls::TlsSession>(std::move(ep), tls_param, tls_cbs);
     }
 
     Impl(std::unique_ptr<IceSocketEndpoint>&& ep,
          tls::CertificateStore& certStore,
+         std::shared_ptr<asio::io_context> ioContext,
          std::function<bool(const dht::crypto::Certificate&)>&& cert_check,
          const Identity& local_identity,
          const std::shared_future<tls::DhParams>& dh_params)
@@ -221,6 +225,8 @@
             /*.certStore = */ certStore,
             /*.timeout = */ std::chrono::duration_cast<decltype(tls::TlsParams::timeout)>(TLS_TIMEOUT),
             /*.cert_check = */ nullptr,
+            /*.io_context = */ ioContext,
+            /* .logger = */ ep->underlyingICE()->logger()
         };
         tls = std::make_unique<tls::TlsSession>(std::move(ep), tls_param, tls_cbs);
     }
@@ -312,20 +318,22 @@
 
 TlsSocketEndpoint::TlsSocketEndpoint(std::unique_ptr<IceSocketEndpoint>&& tr,
                                      tls::CertificateStore& certStore,
+                                     const std::shared_ptr<asio::io_context>& ioContext,
                                      const Identity& local_identity,
                                      const std::shared_future<tls::DhParams>& dh_params,
                                      const dht::crypto::Certificate& peer_cert)
-    : pimpl_ {std::make_unique<Impl>(std::move(tr), certStore, peer_cert, local_identity, dh_params)}
+    : pimpl_ {std::make_unique<Impl>(std::move(tr), certStore, ioContext, peer_cert, local_identity, dh_params)}
 {}
 
 TlsSocketEndpoint::TlsSocketEndpoint(
     std::unique_ptr<IceSocketEndpoint>&& tr,
     tls::CertificateStore& certStore,
+    const std::shared_ptr<asio::io_context>& ioContext,
     const Identity& local_identity,
     const std::shared_future<tls::DhParams>& dh_params,
     std::function<bool(const dht::crypto::Certificate&)>&& cert_check)
     : pimpl_ {
-        std::make_unique<Impl>(std::move(tr), certStore, std::move(cert_check), local_identity, dh_params)}
+        std::make_unique<Impl>(std::move(tr), certStore, ioContext, std::move(cert_check), local_identity, dh_params)}
 {}
 
 TlsSocketEndpoint::~TlsSocketEndpoint() {}