anchor.diff:  	 accept/1, accept/2,
   	 active/2,
   	 close/1,
  -	 connect/2, connect/3,
  +	 connect/1, connect/2, connect/3,
   	 controlling_process/2,
   	 listen/0, listen/1, listen/2,
   	 port/1,
  
positive.code: 	]).
  
  
  -define(READER_RECV_TIMEOUT, 1000).
  
  -define(DATA_MSG(Sock, Method, Data),
  
negative.code:     socket:close(Sock).
  
  %% Create a socket and connect it to a peer
  connect(ServerPath) when is_list(ServerPath) ->
      Domain   = local,
      ServerSA = #{family => Domain, path => ServerPath},
      Opts     = #{domain => Domain,
                   proto  => default,
                   method => plain},
      do_connect(ServerSA, Opts).
  
  connect(Addr, Port) when is_tuple(Addr) andalso is_integer(Port) ->
      Domain   = inet,
      ServerSA = #{family => Domain,
                   addr   => Addr,
                   port   => Port},
      Opts     = #{domain => Domain,
                   proto  => tcp,
                   method => plain},
      do_connect(ServerSA, Opts);
  connect(ServerPath,
          #{domain := local = Domain, proto := default} = Opts)
    when is_list(ServerPath) ->
      ServerSA = #{family => Domain, path => ServerPath},
      do_connect(ServerSA, Opts).
  
  connect(Addr, Port, #{domain := Domain, proto := tcp} = Opts) ->
      ServerSA = #{family => Domain,
                   addr   => Addr,
                   port   => Port},
      do_connect(ServerSA, Opts).
  
  do_connect(ServerSA, #{domain := Domain,
                         proto  := Proto, 
                         method := Method} = Opts) ->
      try
  	begin
  	    Sock =
  		case socket:open(Domain, stream, Proto) of
  		    {ok, S} ->
  			S;
  		    {error, OReason} ->
  			throw({error, {open, OReason}})
  		end,
              LocalSA = which_sa(Domain),
  	    case socket:bind(Sock, LocalSA) of
  		{ok, _} ->
  		    ok;
  		{error, BReason} ->
  		    (catch socket:close(Sock)),
  		    throw({error, {bind, BReason}})
  	    end,
  	    case socket:connect(Sock, ServerSA) of
  		ok ->
  		    ok;
  		{error, CReason} ->
  