anchor.diff:      end;
   socket(Type, _, _, Opts) ->
       error(badarg, [Type, Opts]).
  +
  +-spec call_control(nnsocket(), non_neg_integer(), binary()) -> {error, closed} | term().
  +call_control(Sock, Cmd, Bin) ->
  +    try
  +        binary_to_term(port_control(Sock, Cmd, Bin))
  +    catch
  +        error:badarg ->
  +            {error, closed}
  +    end.
   
   -spec open_socket(nntypename(), nnopenopts()) -> {ok, nnsocket()} | {error, any()}.
   open_socket(Type, Opts) ->
  
positive.code:         {connected, Owner} when Owner /= self() ->
              {error, not_owner};
          undefined ->
              {error, einval};
          _ ->
              {ok, Opts} = getopts(Sock, [active,type]),
              {active,A} = lists:keyfind(active,1,Opts),
  
negative.code: recv(Sock, Timeout) when is_port(Sock) ->
      Ref = make_ref(),
      Bin = term_to_binary(Ref),
      try binary_to_term(port_control(Sock, ?ENM_RECV, Bin)) of
          {Ref, wait} ->
              receive
                  {Ref, Reply} when is_tuple(Reply) ->
  