Skip to content
Download

port

mach::App::port

Returns the port configured for the application.

Returns the port configured for the application.

The returned value corresponds to the port the application will listen on.

[[nodiscard]] std::uint16_t port() const noexcept;

The configured port.

This function is noexcept and does not throw exceptions.

This function is thread-safe.

std::uint16_t port = app.port();
Name Description
host Returns the configured host.
threadCount Returns the configured worker thread count.