anchor.diff:  -spec new(sockmod(), socket(), [proplists:property()]) -> socket_state().
   new(SockMod, Socket, Opts) ->
       MaxStanzaSize = proplists:get_value(max_stanza_size, Opts, infinity),
  +    SockPeer =  proplists:get_value(sock_peer_name, Opts, none),
       XMLStream = case get_owner(SockMod, Socket) of
   		    Pid when Pid == self() ->
   			fxml_stream:new(self(), MaxStanzaSize);
  
positive.code:                        socket            :: socket(),
  		       max_stanza_size   :: timeout(),
  		       xml_stream :: undefined | fxml_stream:xml_stream_state(),
  		       shaper = none :: none | p1_shaper:state()}).
  
  -type socket_state() :: #socket_state{}.
  
  
negative.code: 
  -spec sockname(socket_state()) -> {ok, endpoint()} | {error, inet:posix()}.
  sockname(#socket_state{sockmod = SockMod,
  		       socket = Socket,
  		       sock_peer_name = SockPeer}) ->
      case SockPeer of
  	none ->
  	    case SockMod of
  		gen_tcp -> inet:sockname(Socket);
  		_ -> SockMod:sockname(Socket)
  	    end;
  	{SN, _} ->
  	    {ok, SN}
      end.
  
  -spec peername(socket_state()) -> {ok, endpoint()} | {error, inet:posix()}.
  peername(#socket_state{sockmod = SockMod,
  		       socket = Socket,
  		       sock_peer_name = SockPeer}) ->
      case SockPeer of
  	none ->
  	    case SockMod of
  		gen_tcp -> inet:peername(Socket);
  		_ -> SockMod:peername(Socket)
  	    end;
  	{_, PN} ->
  	    {ok, PN}
      end.
  
  activate(#socket_state{sockmod = SockMod, socket = Socket}) ->
  