anchor.diff:  %% Capabilties exchange has decided on whether or not to run over TLS.
   transition({diameter, {tls, Ref, Type, B}}, #transport{parent = Pid}
                                               = S) ->
  +    true = is_boolean(B),  %% assert
       #transport{}
           = NS
           = tls_handshake(Type, B, S),
  
positive.code:          parent  :: pid(),          %% of process that started us
           module  :: module(),       %% gen_tcp-like module
           frag = <<>> :: frag(),     %% message fragment
           ssl     :: boolean() | [term()],       %% ssl options
           timeout :: infinity | 0..16#FFFFFFFF,  %% fragment timeout
           tref = false  :: false | reference(),  %% fragment timer reference
           flush = false :: boolean(),            %% flush fragment at timeout?
  
negative.code: 
  %% throttle/1
  
  %% Still collecting packets for a complete message: keep receiving.
  throttle(#transport{throttled = false} = S) ->
      recv(S);
  
  %% Decide whether to receive another, or whether to accept a message
  %% that's been received.
  throttle(#transport{throttle_cb = F, throttled = T} = S) ->
      Res = cb(F, T),
  
      try throttle(Res, S) of
          #transport{ssl = SB} = NS when is_boolean(SB) ->
              throttle(defrag(NS));
          #transport{throttled = Msg} = NS when is_binary(Msg) ->
              %% Initial incoming message when we might need to upgrade
              %% to TLS: wait for reception of a tls tuple.
              defrag(NS)
      catch
          #transport{} = NS ->
              recv(NS)
      end.
  
  %% cb/2
  