anchor.diff:  unpack(Message) ->
       {Channel, Maybe_Options} = ppspp_channel:unpack_with_rest(Message),
       {Maybe_Messages, Options} = ppspp_options:unpack(Maybe_Options),
  -    {{handshake, [Channel, Options]}, Maybe_Messages}.
  +    Handshake = #{channel => Channel, options => Options},
  +    {Handshake, Maybe_Messages}.
   
   -spec pack(ppspp_message:message()) -> binary().
   pack(_Message) -> <<>>.
  
positive.code: %% with the swarm handler.
  %%
  %% @end
  -spec handle({handshake, orddict:orddict()},
               ppspp_datagram:endpoint()) -> ok.
  handle({handshake, Body}, Endpoint) ->
      % Inbound channel is just the first 4 bytes of the datagram
      Inbound_channel = ppspp_datagram:get_peer_channel(Endpoint),
      % Source channel is where the peer would like replies sent to
      Source_channel = ppspp_channel:get_channel(Body),
      % These options should match with an available swarm.
      % The channel_worker checks this on startup by looking up the swarm_id.
      Requested_swarm_options = ppspp_options:get_options(Body),
      {ok, Pid} =
      case ppspp_channel:is_channel_zero(Inbound_channel) of
          % If inbound channel is zero then we should start a new channel_worker
          true ->{ok, _Pid} =
                 channel_worker:start(Endpoint, Requested_swarm_options);
          % if non-zero there should be an existing channel. If not, it might
          % prove useful to simply create a new channel anyway, which would
          % allow peers that dropped off for some reason to restart cleanly.
          false -> {ok, _Pid} =
                   channel_worker:where_is(Inbound_channel)
      end,
      % send handshake message to channel_worker for reply
      channel_worker:handle(Pid, {handshake, Source_channel}).
  
negative.code: -module(ppspp_handshake).
  -include("swirl.hrl").
  
  %% api
  -export([unpack/1,
           pack/1,
           handle/2]).
  
  -type handshake() :: #{channel => ppspp_channel:channel(),
                         options => ppspp_options:options()}.
  -export_type([handshake/0]).
  
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  