anchor.diff:  handle_cast(_, P) ->
   	{noreply, P}.
   
  -handle_info({tcp,_S,<<Key:40/binary,Rem/binary>>},#dp{direction = receiver,isinit = false} = 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>> ->
  +		<<"tunnel,",Mod1/binary>> ->
  +			[_From,Mod] = binary:split(Mod1,<<",">>),
  +			ok = gen_tcp:send(S,<<"ok">>),
   			{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]),
  +handle_info({tcp,_S,Bin},#dp{direction = tunnel} = P) ->
  +	case catch apply(P#dp.tunnelmod,tunnel_bin,[P#dp.tunnelstate,Bin]) of
  +		{'EXIT',_Err}  ->
  +			State = P#dp.tunnelstate;
  +		State ->
  +			ok
  +	end,
   	inet:setopts(P#dp.sock,[{active, once}]),
  -	{noreply,P};
  +	{noreply,P#dp{tunnelstate = State}};
   handle_info({tcp,_,<<Id:24/unsigned,SizeAndBody/binary>>},P) ->
   	case get(Id) of
   		undefined ->
  
positive.code: 	[exit(Pid,tcp_closed) || {_Id,{_,Pid}} <- get(), is_pid(Pid)],
  	{stop,normal,P};
  handle_info({tcp_closed,_},P) ->
  	{stop,normal,P};
  handle_info(timeout,P) ->
  	case P#dp.callsininterval of
  
negative.code: -module(bkdcore_rpc).
  -behaviour(gen_server).
  -include("bkdcore.hrl").
  -compile([{parse_transform, lager_transform}]).
  % API
  -export([call/2,cast/2,async_call/3,multicall/2,is_connected/1]).
  % gen_server
  