anchor.diff:         Dir == recv ->
       actions(As, Dir, S);
   
  -actions([Bin | As], send = Dir, #transport{} = S)
  -  when is_binary(Bin) ->
  -    actions(As, Dir, send(Bin, S));
  -
  -actions([Bin | As], recv = Dir, #transport{parent = Pid} = S)
  -  when is_binary(Bin) ->
  -    diameter_peer:recv(Pid, Bin),
  +actions([Msg | As], send = Dir, S)
  +  when is_binary(Msg);
  +       is_record(Msg, diameter_packet) ->
  +    actions(As, Dir, send(Msg, S));
  +
  +actions([Msg | As], recv = Dir, #transport{parent = Pid} = S)
  +  when is_binary(Msg);
  +       is_record(Msg, diameter_packet) ->
  +    diameter_peer:recv(Pid, Msg),
       actions(As, Dir, S);
   
   actions([{defer, Tmo, Acts} | As], Dir, S) ->
  
positive.code: message(ack, _, #transport{message_cb = false} = S) ->
      S;
  
  message(Dir, #diameter_packet{bin = Bin}, S) ->
      message(Dir, Bin, S);
  
  message(Dir, Bin, #transport{message_cb = CB} = S) ->
      recv(<<>>, actions(cb(CB, Dir, Bin), Dir, S)).
  
  %% actions/3
  
  
negative.code:     message(send, Msg, S);
  
  %% Monitor has sent an outgoing message.
  transition(Msg, S)
    when is_record(Msg, diameter_packet);
         is_binary(Msg) ->
      message(ack, Msg, S);
  
  %% Deferred actions from a message_cb.
  transition({actions, Dir, Acts}, S) ->
  