17 #include <bsoncxx/document/view.hpp>
18 #include <bsoncxx/stdx/string_view.hpp>
20 #include <mongocxx/config/prelude.hpp>
23 inline namespace v_noabi {
43 std::uint32_t
id()
const;
58 bsoncxx::stdx::string_view
type()
const;
65 MONGOCXX_DEPRECATED bsoncxx::document::view
is_master()
const;
73 bsoncxx::document::view
hello()
const;
80 bsoncxx::stdx::string_view
host()
const;
87 std::uint16_t
port()
const;
97 #include <mongocxx/config/postlude.hpp>
Class representing what the driver knows about a MongoDB server.
Definition: server_description.hpp:29
std::uint16_t port() const
Returns the server port.
bsoncxx::stdx::string_view host() const
Returns the server host name.
bsoncxx::document::view is_master() const
bsoncxx::stdx::string_view type() const
The server type: "Unknown", "Standalone", "Mongos", "PossiblePrimary", "RSPrimary",...
bsoncxx::document::view hello() const
The server's last response to the "hello" command, or an empty document if the driver has not yet rea...
std::int64_t round_trip_time() const
The duration of the last hello call, indicating network latency.
std::uint32_t id() const
An opaque id, unique to this server for this mongocxx::client or mongocxx::pool.
~server_description()
Destroys a server_description.
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24