anchor.diff:      %% TODO call OnConnectFun
       {ok, Pid}.
   
  +%% Helper functions
  +
   host_to_list({_, _, _, _} = IP4) -> inet:ntoa(IP4);
   host_to_list({_, _, _, _, _, _, _, _} = IP6) -> inet:ntoa(IP6);
   host_to_list(BHost) when is_binary(BHost) -> binary_to_list(BHost);
   host_to_list(Host) when is_list(Host) -> Host.
   
  +get_client(Pool) ->
  +    try
  +        gen_server:call(Pool, get_client)
  +    catch
  +        exit:{timeout, _} ->
  +            {error, timeout}
  +    end.
  +
  +free_client(Pool, Client) ->
  +    gen_server:cast(Pool, {free_client, Client}).
  +
  +wait_for_response(Client, StreamRef) ->
  +    case gun:await(Client, StreamRef) of
  +        {response, fin, _Status, _Headers} ->
  +            no_data;
  +        {response, nofin, _Status, _Headers} ->
  +            gun:await_body(Client, StreamRef)
  +    end.
  +
  +gun_options(Args) ->
  +    case proplists:get_value(ssl, Args, false) of
  +        true ->
  +            #{transport => tls};
  +        _ ->
  +            #{}
  +    end.
  +
  
positive.code:                 busy = [],
                  queue = queue:new()
                 }, 0}.
  
  gun_options(Args) ->
      case proplists:get_value(ssl, Args, false) of
          true ->
              #{transport => tls};
          _ ->
              #{}
      end.
  
  handle_call(get_client, _From, State = #state{free = [Client | Free],
                                                busy = Busy}) ->
  
negative.code: start_link(Args) ->
      gen_server:start_link(?MODULE, [Args], []).
  
  stop(Pool) ->
      gen_server:cast(Pool, stop).
  
  