anchor.diff:    end.
   
   accept_callouts(S, [_Socket, Id]) ->
  -  case [ Sock || Sock <- S#state.sockets,
  -                 Sock#socket.parent == Id,
  -                 lists:member(Sock#socket.tcp_state, [established, close_wait]),
  -                 Sock#socket.socket == undefined ] of
  -    [Sock | _] ->
  -      NewId = Sock#socket.id,
  +  Sock = get_socket(S, Id),
  +  case Sock#socket.accept_queue of
  +    [NewId | _] ->
  +      ?UPD(Id, accept_queue, [_ | Q], Q),
         ?APPLY(set_socket, [NewId]);
       [] ->
  -      Sock = get_socket(S, Id),
         ?SET(Id, blocked, Sock#socket.blocked ++ [?SELF]),
         ?MATCH(NewId, ?BLOCK({accept, ?SELF})),
         ?WHEN(NewId /= closed, ?APPLY(set_socket, [NewId]))
  
positive.code: 
  -define(SET(Id, Key, Value), ?APPLY(set, [Id, #socket.Key, Value])).
  -define(INC(Id, Key),        ?APPLY(inc, [Id, #socket.Key])).
  
  -define(MAX_SOCKETS, 5).
  
  -record(socket,{tcp_state = undefined, ip, port, rip, rport, socket,
                 socket_type, seq, rcvd, rseq, id, parent, blocked = []}).
  
  -record(state, {ip, sockets = []}).
  
  
negative.code:   Sock = get_socket(S, Id),
    ?PAR([ ?UNBLOCK({close, Pid}, ok) || Pid <- Sock#socket.blocked ]).
  
  upd_next(S, _, [Id, Key, Fun]) ->
    Sock = get_socket(S, Id),
    set_socket(S, Id, setelement(Key, Sock, Fun(element(Key, Sock)))).
  
  set_next(S, _, [Id, Key, Value]) ->
    Sock = get_socket(S, Id),
  