anchor.diff:    spawn.
   
   %% --- close ---
  -child_in(S, Id, TcpState) ->
  -  Children = 
  -    [ Sock#socket.tcp_state || Sock<-S#state.sockets,
  -                               Sock#socket.parent == Id],
  -  lists:member(TcpState, Children).
   
   close_states() ->
     [established, close_wait, listen].
  
positive.code: weight(_S, open)    -> 1;
  weight(_S, close)   -> 2;
  weight(_S, deliver) -> 10;
  weight(_S, _Cmd)    -> 3.
  
  prop_encode_decode() ->
  
negative.code:   case get_socket(S, Id) of
      Sock = #socket{socket = Socket} ->
        Socket /= undefined andalso
        in_tcp_state(Sock, close_states());
      _ ->
        false
    end.
  