2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-31 05:55:28 +00:00

[#3478] Added getNative() to HTTP listener

This commit is contained in:
Francis Dupont
2024-07-31 12:34:09 +02:00
parent 254d49f87a
commit d619d7be34
4 changed files with 16 additions and 0 deletions

View File

@@ -42,6 +42,11 @@ HttpListener::getLocalPort() const {
return (impl_->getEndpoint().getPort());
}
int
HttpListener::getNative() const {
return (impl_->getNative());
}
void
HttpListener::start() {
impl_->start();

View File

@@ -115,6 +115,9 @@ public:
/// @brief Returns local port on which server is listening.
uint16_t getLocalPort() const;
/// @brief file descriptor of the underlying acceptor socket.
int getNative() const;
/// @brief Starts accepting new connections.
///
/// This method starts accepting and handling new HTTP connections on

View File

@@ -67,6 +67,11 @@ HttpListenerImpl::getEndpoint() const {
return (*endpoint_);
}
int
HttpListenerImpl::getNative() const {
return (acceptor_ ? acceptor_->getNative() : -1);
}
void
HttpListenerImpl::start() {
try {

View File

@@ -59,6 +59,9 @@ public:
/// @brief Returns reference to the current listener endpoint.
const asiolink::TCPEndpoint& getEndpoint() const;
/// @brief file descriptor of the underlying acceptor socket.
int getNative() const;
/// @brief Starts accepting new connections.
///
/// This method starts accepting and handling new HTTP connections on