anchor.diff:      nksip_transport_conn:start_link(AppId, Transp1, Socket, Timeout).
   
   
  -%% @private
  -socket_connect(tcp, Ip, Port, Opts) -> gen_tcp:connect(Ip, Port, Opts);
  -socket_connect(tls, Ip, Port, Opts) -> ssl:connect(Ip, Port, Opts).
  -
  -
  -%% @private
  -setopts(tcp, Socket, Opts) -> inet:setopts(Socket, Opts);
  -setopts(tls, Socket, Opts) -> ssl:setopts(Socket, Opts).
  -
  -
  -%% @private
  -controlling_process(tcp, Socket, Pid) -> gen_tcp:controlling_process(Socket, Pid);
  -controlling_process(tls, Socket, Pid) -> ssl:controlling_process(Socket, Pid).
  -
  -
  
positive.code: connect(AppId, Transp, Opts) ->
      #transport{proto=Proto, remote_ip=Ip, remote_port=Port} = Transp,
      SocketOpts = outbound_opts(Proto, Opts),
      case socket_connect(Proto, Ip, Port, SocketOpts) of
          {ok, Socket} -> 
              {ok, {LocalIp, LocalPort}} = case Proto of
                  tcp -> inet:sockname(Socket);
  
negative.code:                 [?MODULE]
              },
              {ok, Pid} = nksip_transport_sup:add_transport(AppId, Spec),
              TranspMod:controlling_process(Socket, Pid),
              InetMod:setopts(Socket, [{active, once}]),
              ?debug(AppId, "~p connected to ~p", [Proto, {Ip, Port}]),
              {ok, Pid, Transp1};
          {error, Error} ->
  