anchor.diff:  local_sock_to_ipstr(Sock) ->
       {ok,{{A,B,C,D},_Port}} = inet:sockname(Sock),
       mkstr("~p.~p.~p.~p",[A,B,C,D]).
  +
  +sock_to_port(Sock) ->
  +    {ok,{_,Port}} = inet:peername(Sock),
  +    Port.
  +
  +local_sock_to_port(Sock) -> 
  +    {ok,{_,Port}} = inet:sockname(Sock),
  +    Port.
   
   sock_to_ipstr(Sock) ->
       {ok,{{A,B,C,D},_Port}} = inet:peername(Sock),
  
positive.code:     {ok,{H,P}} = inet:peername(Sock),
      ip_port_to_str(H,P).
  
  mkio(Bin) when is_binary(Bin) -> [Bin];
  mkio(Atom) when is_atom(Atom) -> atom_to_list(Atom);
  mkio(Int) when is_integer(Int) -> integer_to_list(Int);
  
negative.code: ip_port_to_str({A,B,C,D},Port) ->
      mkstr("~p.~p.~p.~p:~p",[A,B,C,D,Port]).
  
  ip_port_to_bin({A,B,C,D},Port) ->
      mkbin("~p.~p.~p.~p:~p",[A,B,C,D,Port]).
  
  local_sock_to_str(Sock) ->
      {ok,{H,P}} = inet:sockname(Sock),
      ip_port_to_str(H,P).
  