anchor.diff:      {noreply, NewState :: #state{}} |
       {noreply, NewState :: #state{}, timeout() | hibernate} |
       {stop, Reason :: term(), NewState :: #state{}}).
  +
  +handle_cast(async_init, S = #state{filter = Filter,repo = Repo}) ->
  +    SubState = Repo:load(Filter),
  +    S1 = recover(S,SubState),
  +    {noreply,S1};
  +
  +handle_cast({request_more,ClientId,FromSeq,WSize}, S) ->
  +    handle_request_for_more(ClientId,FromSeq,WSize,S),
  +    {noreply,S};
  +
  +handle_cast({ack,ClientId,AckSeq}, S) ->
  +    handle_ack(ClientId,AckSeq,S),
  +    {noreply,S};
  +
   handle_cast(_Request, State) ->
       {noreply, State}.
   
  
positive.code:     gen_server:call(Pid,{push,Packet,QoS}).
  
  request_more(Pid,ClientId,FromSeq,WSize) ->
      gen_server:call(Pid,{request_more,ClientId,FromSeq,WSize}).
  
  %% Hides the supervisor
  new(Filter) ->
  
negative.code: %%    maybe_process_pending(PSeq,LAck1,Req1,Sub).
  
  %% @doc
  %% Invariants:
  %% LastSent =< LastReq
  %%
  %%
  %%
  %%
  %%
  %% @end
  
  %% @doc
  %% Determine the sequence range of packets to send depending on the size of the Client's Window
  %% @end
  packet_range_to_send(Max,From,WSize,Sub = #sub{last_sent = LastSent,
                                                 requested = LastReq}) ->
      LastReq1 = max(LastReq,From+WSize),
      SendTo = min(LastReq1,Max),
      Sub1 = Sub#sub{last_sent = SendTo,
                     requested = LastReq1},
      Range = {LastSent,SendTo},
      {ok,Sub1,Range}.
  
  
  %% ===================================================================
  %% Packet Sending
  