anchor.diff:                  _ = inet:setopts(Socket, [{active, once}]),
                   inc_r_msg_count(State);
               {user_close} ->
  -                log:log(warn,"[ CC ] tcp user_close request", []),
  +                log:log(warn,"[ CC ~p ] tcp user_close request", [self()]),
                   gen_tcp:close(Socket),
                   set_socket(State, notconnected);
               Unknown ->
  -                log:log(warn,"[ CC ] unknown message ~.0p", [Unknown]),
  +                log:log(warn,"[ CC ~p ] unknown message ~.0p", [self(), Unknown]),
                   %% may fail, when tcp just closed
                   _ = inet:setopts(Socket, [{active, once}]),
                   State
  
positive.code:                 report_bundle_error(Options,
                                      {Address, Port, Pid},
                                      Message, socket_closed),
                  log:log(warn,"[ CC ] sending closed connection", []),
                  gen_tcp:close(Socket),
                  notconnected;
              {error, timeout} ->
                  log:log(error,"[ CC ] couldn't send to ~.0p:~.0p (~.0p). retrying.",
                          [Address, Port, timeout]),
                  send_internal(Receiver, Pid, Message, Options, BinaryMessage, State);
              {error, Reason} ->
                  report_bundle_error(Options,
                                      {Address, Port, Pid},
                                      Message, Reason),
                  log:log(error,"[ CC ] couldn't send to ~.0p:~.0p (~.0p). closing connection",
                          [Address, Port, Reason]),
                  gen_tcp:close(Socket),
                  notconnected
      end,
  
negative.code:                     Socket;
                  {error, Reason} ->
                      % note: this should not occur since the socket was just created with 'ok'
                      log:log(error,"[ CC ~p ] reconnect to ~.0p because socket is ~.0p",
                              [self(), Address, Reason]),
                      gen_tcp:close(Socket),
                      new_connection(Address, Port, MyPort, Channel)
              end;
          {error, Reason} ->
              log:log(info,"[ CC ~p ] couldn't connect to ~.0p:~.0p (~.0p)",
                      [self(), Address, Port, Reason]),
              fail
      end.
  
  