anchor.diff:  -include("scalaris.hrl").
   
   %% @doc new accepted connection. called by comm_acceptor
  -%% @spec new(inet:ip_address(), int(), socket()) -> pid()
  +-spec new(inet:ip_address(), integer(), inet:socket()) -> pid().
   new(Address, Port, Socket) ->
       spawn(fun () -> loop(Socket, Address, Port) end).
   
  +-spec tcp_options() -> [{term(), term()}].
   tcp_options() ->
   %    [{active, once}, {nodelay, true}, {send_timeout, config:read(tcp_send_timeout)}].
       [{active, once},
  
positive.code:                 end),
      Pid.
  
  
  send({_Address, _Port, Socket}, Pid, Message) ->
      BinaryMessage = term_to_binary({deliver, Pid, Message}),
      erlang:port_command(Socket, BinaryMessage),
      ok.
  
  loop(fail, Address, Port) ->
      comm_server:unregister_connection(Address, Port),
  
negative.code: ].
  
  %% @doc open new connection
  -spec open_new(inet:ip_address(), integer(), inet:ip_address() | undefined, integer()) ->
         {local_ip, inet:ip_address(), integer(), pid(), inet:socket()}
       | fail
       | {connection, pid(), inet:socket()}.
  open_new(Address, Port, undefined, MyPort) ->
      Myself = self(),
      LocalPid = spawn(fun () ->
  