查看MongoDB C++驱动程序文档(the one correspoding to the old driver或与the new one对应的驱动程序),DBClientReplicaSet的签名如下:

mongo::DBClientReplicaSet::DBClientReplicaSet(
   const std::string&               name,
   const std::vector<HostAndPort>&  servers,
   double                           so_timeout = 0
)

尽管nameserver很清楚,但未指定so_timeout参数的含义。

不知道我是否在寻找正确的文档资料,但是如果有人可以澄清,那就太好了。谢谢!

最佳答案

我相信这是套接字超时设置。 C++驱动程序未记录其含义,因此我将从Python driver docs中窃取解释:

10-08 19:52