Arguments
host
(string vector) A list of hosts/ports to which to connect. If a
port is not given, 27017 is used. Seperate ports from the IP address by
colon, like "120.0.0.1:12345".
name
(string) The name of the replset to which to connect. If name ==
"" (the default), the hosts are tried one by one until a connection is made.
Otherwise, name must be the name of the replset and the given hosts are
assumed to be seeds of the replset. Each of these is connected to and
queried in turn until one reports that it is a master. This master is then
queried for a list of hosts and these are in turn connected to and verified
as belonging to the given replset name. When one of these reports that it
is a master, that connection is used to form the actual connection as
returned.
username
(string) The username to be used for authentication
purposes. The default username of "" indicates that no user authentication
is to be performed by the initial connect.
password
(string) The password corresponding to the given username.
db
(string) The name of the database upon which to authenticate the
given username and password. If authentication fails, the connection is
disconnected, but mongo.get.err() will indicate not indicate an error.
timeout
(as.integer) The number of milliseconds to wait before timing
out of a network operation. The default (0L) indicates no timeout.