mirror of
https://github.com/CrowCpp/Crow.git
synced 2024-06-07 21:10:44 +00:00
Merge pull request #592 from xandross389/get-some-server-running-params
Add functions that return info about server's threads number and bind address.
This commit is contained in:
commit
e041d35d99
@ -167,7 +167,6 @@ namespace crow
|
||||
return port_;
|
||||
}
|
||||
|
||||
|
||||
/// Set the connection timeout in seconds (default is 5)
|
||||
self_t& timeout(std::uint8_t timeout)
|
||||
{
|
||||
@ -188,6 +187,12 @@ namespace crow
|
||||
bindaddr_ = bindaddr;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Get the address that Crow will handle requests on
|
||||
std::string bindaddr()
|
||||
{
|
||||
return bindaddr_;
|
||||
}
|
||||
|
||||
/// Run the server on multiple threads using all available threads
|
||||
self_t& multithreaded()
|
||||
@ -203,6 +208,12 @@ namespace crow
|
||||
concurrency_ = concurrency;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/// Get the number of threads that server is using
|
||||
std::uint16_t concurrency()
|
||||
{
|
||||
return concurrency_;
|
||||
}
|
||||
|
||||
/// Set the server's log level
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user