host
mach::App::host
Returns the host configured for the application.
Description
Section titled “Description”Returns the host configured for the application.
The returned value corresponds to the host that will be used when the application starts listening for incoming connections.
Syntax
Section titled “Syntax”[[nodiscard]] std::string host() const noexcept;Return Value
Section titled “Return Value”The configured host.
Exceptions
Section titled “Exceptions”This function is noexcept and does not throw exceptions.
Thread Safety
Section titled “Thread Safety”This function is thread-safe.
Example
Section titled “Example”std::string host = app.host();See Also
Section titled “See Also”| Name | Description |
|---|---|
port |
Returns the configured port. |
threadCount |
Returns the configured worker thread count. |