| Module | Mongo::Server::Connectable |
| In: |
lib/mongo/server/connectable.rb
|
This provides common behavior for connection objects.
@since 2.0.0
| SSL | = | 'ssl'.freeze |
The ssl option prefix.
@since 2.1.0 |
|
| TIMEOUT | = | 5.freeze |
The default time in seconds to timeout an operation executed on a socket.
@since 2.0.0 @deprecated Timeouts on Ruby sockets aren‘t effective so this default option is no longer used. Will be removed in driver version 3.0. |
| pid | [R] | @return [ Integer ] pid The process id when the connection was created. |
| socket | [R] |
Determine if the server is connectable. This will check not only if the connection exists, but if messages can send to it successfully.
@example Is the server connectable?
connection.connectable?
@return [ true, false ] If the connection is connectable.
@since 2.1.0
@deprecated No longer necessary with Server Selection specification.
Determine if the connection is currently connected.
@example Is the connection connected?
connection.connected?
@return [ true, false ] If connected.
@deprecated Use connectable? instead