anchor.diff:  
   -type handle_event_result() :: gen_statem:handle_event_result().
   
  +-define(CONNECTED(StateName), 
  +        (element(1,StateName) == connected orelse
  +         element(1,StateName) == ext_info ) ).
  +
   -spec handle_event(gen_statem:event_type(),
   		   event_content(),
   		   state_name(),
  
positive.code:     {keep_state_and_data, [{reply,From,Reply}]};
  
  handle_event({call,From}, {close, ChannelId}, StateName, D0) 
    when element(1,StateName) == connected ;
         element(1,StateName) == ext_info ->
      case ssh_channel:cache_lookup(cache(D0), ChannelId) of
  	#channel{remote_id = Id} = Channel ->
  	    D1 = send_msg(ssh_connection:channel_close_msg(Id), D0),
  
negative.code: 	    keep_state_and_data
      end;
  
  handle_event(cast, {request,ChannelPid, ChannelId, Type, Data}, StateName, D) when ?CONNECTED(StateName) ->
      {keep_state,  handle_request(ChannelPid, ChannelId, Type, Data, false, none, D)};
  
  handle_event(cast, {request,ChannelId,Type,Data}, StateName, D) when ?CONNECTED(StateName) ->
      {keep_state,  handle_request(ChannelId, Type, Data, false, none, D)};
  
  handle_event(cast, {unknown,Data}, StateName, D) when ?CONNECTED(StateName) ->
      Msg = #ssh_msg_unimplemented{sequence = Data},
      {keep_state, send_msg(Msg,D)};
  
  