anchor.diff:      subscribe/3,
       unsubscribe/2,
       publish/4,
  +    publish/5,
       disconnect/1,
       call/2,
       cast/2]).
  
positive.code:     gen_fsm:start(Name, ?MODULE, [Module, Args, Opts], GenFSMOpts).
  
  publish(P, Topic, Payload, Qos) ->
      gen_fsm:send_event(P, {publish, Topic, Payload, Qos, false}).
  
  subscribe(P, [T|_] = Topics) when is_tuple(T) ->
      gen_fsm:send_event(P, {subscribe, Topics}).
  
negative.code:     send_frame(Transport, Sock, Frame),
      State.
  
  send_publish(MsgId, Topic, Payload, QoS, Retain, Dup, State) ->
      #state{transport={Transport, _}, sock = Sock, waiting_acks=WAcks,
          retry_interval=RetryInterval, info_fun=InfoFun} = State,
      Frame = #mqtt_publish{
  