anchor.diff:  gen_opts(LAddrOpt, Opts) ->
       {L,_} = proplists:split(Opts, [binary, packet, active]),
       [[],[],[]] == L orelse ?ERROR({reserved_options, Opts}),
  -    [binary, {packet, 0}, {active, once}] ++ LAddrOpt ++ Opts.
  +    [binary, {packet, 0}, {active, false}] ++ LAddrOpt ++ Opts.
   
   %% ---------------------------------------------------------------------------
   %% # ports/1
  
positive.code: %% since all messages with length problems are discarded this should
  %% also eventually lead to watchdog failover.
  
  %% No fragment to flush.
  flush(#transport{frag = <<>>} = S) ->
      S;
  
  %% Messages have been received since last timer expiry.
  
negative.code: 
  %% Initial incoming message when we might need to upgrade to TLS:
  %% don't request another message until we know.
  transition({tcp, Sock, Bin}, #transport{socket = Sock,
                                          parent = Pid,
                                          frag = Head,
                                          ssl = Opts}
                               = S)
    when is_list(Opts) ->
      case rcv(Head, Bin) of
          {Msg, B} ->
              diameter_peer:recv(Pid, Msg),
              S#transport{frag = B};
          Frag ->
              setopts(S),
              start_fragment_timer(S#transport{frag = Frag})
      end;
  
  %% Incoming message.
  transition({P, Sock, Bin}, #transport{socket = Sock,
                                        ssl = B,
                                        throttled = T}
                             = S)
    when P == tcp, not B;
         P == ssl, B ->
      false = T,  %% assert
      recv(Bin, S);
  
  %% Check whether or not to read more after a throttle_cb timeout.
  transition(throttle, #transport{throttled = B} = S) ->
      true = B,  %% assert
      throttle(S);
  
  %% Capabilties exchange has decided on whether or not to run over TLS.
  transition({diameter, {tls, Ref, Type, B}}, #transport{parent = Pid}
                                              = S) ->
      #transport{}
          = NS
          = tls_handshake(Type, B, S),
      Pid ! {diameter, {tls, Ref}},
      throttle(NS#transport{ssl = B});
  
  transition({C, Sock}, #transport{socket = Sock,
                                   ssl = B})
  