 
   defp record_type(%Document{}), do: {:raw, "d"}
   defp record_type(%BinaryRecord{}), do: {:raw, "b"}
+
+  defp put_default_port(opts) do
+    port = if opts[:ssl], do: @default_ssl_port, else: @default_tcp_port
+    Keyword.put(opts, :port, port)
+  end
 end

  """
  @spec start_link(Keyword.t) :: GenServer.on_start
  def start_link(opts \\ []) do
    C.start_link(Keyword.merge(@default_opts, opts))
  end

  @doc """


  @default_opts [
    host: "localhost",
    ssl: false,
  ]

  @default_tcp_port 2424
  @default_ssl_port 2434

  @default_fetch_plan ""

