Represents a connection to a MongoDB instance. All connections on creation should be connected to a MongoDB instance and ready to go.
Default implementation is a
Authenticates this connection against a database with the given user credentials. If given,
mechanismmust be one of:
SCRAM-SHA-1- default for MongoDB 3.x +
MONGODB-CR- default for MongoDB 2.x
A map of databases -> users this connection is authenticated as.
abstract Void close()
Closes the connection. Should never throw an IOErr.
abstract InStream in()
Data from MongoDB to the client.
abstract Bool isClosed()
trueif this socket is closed.
Logs this connection out from the given database.
abstract OutStream out()
Data to MongoDB from the client.