anchor.diff:          _ ->
               ignore
       end,
  -    process_packet(T, SslSocket, NewState);
  +    process_packet(T, NewState);
   % ack
  -process_packet([{<<"a">>, Attrs}|T], SslSocket, State) ->
  +process_packet([{<<"a">>, Attrs}|T], State) ->
  +io:format("=============~p~n", [Attrs]),
       {<<"id">>, MsgId} = lists:keyfind(<<"id">>, 1, Attrs),
  +    {<<"device">>, DeviceName} = lists:keyfind(<<"device">>, 1, Attrs),
       NewMsgCache = lists:keydelete(MsgId,
                                     #message.id,
                                     State#state.msg_cache),
   
  -    Device = lists:keyfind(SslSocket,
  -                           #device.ssl_socket,
  +    Device = lists:keyfind(DeviceName,
  +                           #device.name,
                              State#state.device_list),
       NewDeviceMsgCache = lists:keydelete(MsgId,
                                           #message.id,
                                           Device#device.msg_cache),
       NewDevice = Device#device{msg_cache = NewDeviceMsgCache},
  -    NewDeviceList = lists:keystore(SslSocket,
  -                                   #device.ssl_socket,
  +    NewDeviceList = lists:keystore(DeviceName,
  +                                   #device.name,
                                      State#state.device_list,
                                      NewDevice),
   
       NewState = State#state{device_list = NewDeviceList,
                              msg_cache = NewMsgCache},
  -    process_packet(T, SslSocket, NewState);
  -process_packet([], _, NewState) ->
  +    process_packet(T, NewState);
  +process_packet([], NewState) ->
       {ok, NewState}.
   
   
  -process_message(SslSocket, State, {Type, Attrs}) ->
  -    {value, Device, OtherDeivces} = lists:keytake(SslSocket,
  -                                                  #device.ssl_socket,
  +process_message(State, {Type, Attrs}) ->
  +    {<<"device">>, DeviceName} = lists:keyfind(<<"device">>, 1, Attrs),
  +    {value, Device, OtherDeivces} = lists:keytake(DeviceName,
  +                                                  #device.name,
                                                     State#state.device_list),
   
       {<<"id">>, MsgId} = lists:keyfind(<<"id">>, 1, Attrs),
  
positive.code:     end,
      setopts(SslSocket),
      {noreply, NewState, NewState#state.heartbeat_timeout};
  handle_info({ssl, SslSocket, Bin}, State) ->
      {ok, Toml} = toml:binary_2_term(Bin),
      {ok, NewState} = process_packet(Toml, SslSocket, State),
      {noreply, NewState, NewState#state.heartbeat_timeout};
  % connection closed
  handle_info({ssl_closed, _SslSocket}, State) ->
  
negative.code: %% business receiver
  %% ===================================================================
  
  handle_info({middleman, Toml}, State) ->
      {ok, NewState} = process_packet(Toml, State),
      {noreply, NewState, NewState#state.heartbeat_timeout};
  handle_info(Message, State) when is_record(Message, message) ->
      {ok, NewState} = send_msg_2_multiple_device(State#state.device_list,
                                                  Message,
  