rmongodb (version 1.8.0)

mongo.get.timeout: Get the timeout value of a mongo connection

Description

Get the timeout value for network operations on a mongo connection.

Usage

mongo.get.timeout(mongo)

Arguments

mongo
(mongo) a mongo connection object.

Value

(integer) timeout value in milliseconds.

See Also

mongo.set.timeout, mongo.create, mongo.

Examples

Run this code
mongo <- mongo.create()
if (mongo.is.connected(mongo)) {
    mongo.set.timeout(mongo, 2000L)
    timeout <- mongo.get.timeout(mongo)
    if (timeout != 2000L)
        error("expected timeout of 2000");
}

Run the code above in your browser using DataLab