# File lib/thinking_sphinx/connection/client.rb, line 4
  def initialize(options)
    if options[:socket].present?
      options[:socket] = options[:socket].remove /:mysql41$/

      options.delete :host
      options.delete :port
    else
      options.delete :socket

      # If you use localhost, MySQL insists on a socket connection, but in this
      # situation we want a TCP connection. Using 127.0.0.1 fixes that.
      if options[:host].nil? || options[:host] == "localhost"
        options[:host] = "127.0.0.1"
      end
    end

    @options = options
  end