# File lib/mongo/server/connection.rb, line 129 def connect! unless @socket socket = address.socket(socket_timeout, ssl_options, connect_timeout: address.connect_timeout) handshake!(socket) pending_connection = PendingConnection.new(socket, @server, monitoring, options) authenticate!(pending_connection) # When @socket is assigned, the socket should have handshaken and # authenticated and be usable. @socket = socket end true end