return (impl_->getEndpoint().getPort());
}
+int
+HttpListener::getNative() const {
+ return (impl_->getNative());
+}
+
void
HttpListener::start() {
impl_->start();
/// @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
return (*endpoint_);
}
+int
+HttpListenerImpl::getNative() const {
+ return (acceptor_ ? acceptor_->getNative() : -1);
+}
+
void
HttpListenerImpl::start() {
try {
/// @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