class Mongo::Server::PendingConnection
This class encapsulates connections during handshake and authentication.
@api private
Attributes
id[R]
@return [ Integer ] The ID for the connection. This is the same ID
as that of the regular Connection object for which this PendingConnection instance was created.
Public Class Methods
new(socket, server, monitoring, options = {})
click to toggle source
# File lib/mongo/server/pending_connection.rb, line 24 def initialize(socket, server, monitoring, options = {}) @socket = socket @options = options @server = server @monitoring = monitoring @id = options[:id] end
Public Instance Methods
ensure_connected() { |socket| ... }
click to toggle source
# File lib/mongo/server/pending_connection.rb, line 37 def ensure_connected yield @socket end