return (impl_->getEndpoint().getPort());
}
+const TlsContextPtr&
+HttpListener::getTlsContext() const {
+ return (impl_->getTlsContext());
+}
+
int
HttpListener::getNative() const {
return (impl_->getNative());
/// @brief Returns local port on which server is listening.
uint16_t getLocalPort() const;
+ /// @brief Returns reference to the current TLS context.
+ const asiolink::TlsContextPtr& getTlsContext() const;
+
/// @brief file descriptor of the underlying acceptor socket.
int getNative() const;
return (*endpoint_);
}
+const TlsContextPtr&
+HttpListenerImpl::getTlsContext() const {
+ return (tls_context_);
+}
+
int
HttpListenerImpl::getNative() const {
return (acceptor_ ? acceptor_->getNative() : -1);
/// @brief Returns reference to the current listener endpoint.
const asiolink::TCPEndpoint& getEndpoint() const;
+ /// @brief Returns reference to the current TLS context.
+ const asiolink::TlsContextPtr& getTlsContext() const;
+
/// @brief file descriptor of the underlying acceptor socket.
int getNative() const;
ASSERT_NO_THROW(listener.start());
ASSERT_EQ(SERVER_ADDRESS, listener.getLocalAddress().toText());
ASSERT_EQ(SERVER_PORT, listener.getLocalPort());
+ ASSERT_EQ(server_context_, listener.getTlsContext());
ASSERT_NO_THROW(startRequest(request));
ASSERT_NO_THROW(runIOService());
ASSERT_EQ(1, clients_.size());