anchor.diff:  	[exit(Pid,tcp_closed) || {_Id,{_,Pid}} <- get(), is_pid(Pid)],
   	{stop,normal,P};
   handle_info({tcp_closed,_},P) ->
  +	lager:debug("Connection closed type ~p",[P#dp.direction]),
   	{stop,normal,P};
   handle_info(timeout,P) ->
   	case P#dp.callsininterval of
  
positive.code: handle_cast(_, P) ->
  	{noreply, P}.
  
  handle_info({tcp,_S,<<Key:40/binary,Rem/binary>>},#dp{direction = receiver,isinit = false} = P) ->
  	Key = bkdcore:rpccookie(),
  	inet:setopts(P#dp.sock,[{active, once}]),
  	case Rem of
  		<<>> ->
  			{noreply,P#dp{isinit = true}};
  		<<"tunnel",Mod/binary>> ->
  			{noreply,P#dp{direction = tunnel, isinit = true, permanent = true, 
  						  tunnelmod = binary_to_existing_atom(Mod,latin1)}}
  	end;
  handle_info({tcp,_,Bin},#dp{direction = tunnel} = P) ->
  	apply(P#dp.tunnelmod,tunnel_bin,[Bin]),
  	inet:setopts(P#dp.sock,[{active, once}]),
  	{noreply,P};
  handle_info({tcp,_,<<Id:24/unsigned,SizeAndBody/binary>>},P) ->
  	case get(Id) of
  		undefined ->
  
negative.code: 	Pid.
  
  -record(dp,{sock,sendproc,calln = 0,callsininterval = 0, callcount = 0,
  			permanent = false, direction,transport, tunnelstate,
  			isinit = false, connected_to,tunnelmod, reconnecter}).
  
  handle_call(_Msg,_,#dp{direction = sender, sock = undefined} = P) ->
  