anchor.diff:      case catch ssl:connect(Host, Port,
                              [{packet, 4}, {active, once}, binary | SSLOptions], 10000) of
           {ok, Socket} ->
  +            erlang:send_after(?Timeout, self(), timeout),
               {ok, #state{socket = Socket,
                           module = Module,
                           client = true,
  -                        ssl    = {true, SSLOptions}},  ?Timeout};
  +                        ssl    = {true, SSLOptions}}};
           Reason ->
               log(debug, ?MODULE, init, [Reason, self()],
                   "Shutting down, failed to establish connection.",
  
positive.code:     log(debug, ?MODULE, handle_cast, [Function, self()],
          "Send cast.", ?LINE, Module),
      doSendPacket(Socket, {rpc, Function, Args}),
      {noreply, State, ?Timeout};
  handle_cast({cast, Function, Args}, State = #state{socket = Socket,
                                                     module = Module}) ->
      log(debug, ?MODULE, handle_cast, [Function, self()],
          "Send cast.", ?LINE, Module),
      doSendPacketSSL(Socket, {rpc, Function, Args}),
      {noreply, State, ?Timeout};
  handle_cast({stop, Offender}, State = #state{module = Module}) ->
      log(debug, ?MODULE, stop, [State, self(), Offender],
          "Shutting down, stop received.", ?LINE, Module),
      {stop, normal, State};
  handle_cast(_Msg, State) ->
      {noreply, State, ?Timeout}.
  
  %%--------------------------------------------------------------------
  %% @private
  
negative.code:                                                  ssl    = false}) ->
      doSendPacket(Socket, pong),
      inet:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({ssl, Socket, ?Ping}, State = #state{socket = Socket}) ->
      doSendPacketSSL(Socket, pong),
      ssl:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({tcp, Socket, ?Ping}, State = #state{socket = Socket,
                                                   ssl    = false}) ->
      doSendPacket(Socket, pong),
      inet:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({ssl, Socket, ?Ping}, State = #state{socket = Socket}) ->
      doSendPacketSSL(Socket, pong),
      ssl:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({tcp, Socket, ?Pong}, State = #state{socket   = Socket,
                                                   timerRef = Ref,
                                                   ssl      = false,
                                                   module   = Module}) ->
  
      log(debug, ?MODULE, handle_info, [Socket],
          "Received pong from socket...", ?LINE, Module),
  
      cancelTimer(Ref),
  
      inet:setopts(Socket,[{active,once}]),
      {noreply, State#state{timerRef = undefined}};
  handle_info({ssl, Socket, ?Pong}, State = #state{socket   = Socket,
                                                   timerRef = Ref,
                                                   module   = Module}) ->
  
      log(debug, ?MODULE, handle_info, [Socket],
          "Received pong from socket...", ?LINE, Module),
  
      cancelTimer(Ref),
  
      ssl:setopts(Socket,[{active,once}]),
      {noreply, State#state{timerRef = undefined}};
  handle_info({tcp, Socket, Data}, State = #state{socket = Socket,
                                                  module = Module}) ->
      handlePacket(self(), Module, Data),
      inet:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({ssl, Socket, Data}, State = #state{socket = Socket,
                                                  module = Module}) ->
      handlePacket(self(), Module, Data),
      ssl:setopts(Socket,[{active,once}]),
      {noreply, State};
  handle_info({tcp_closed, Socket}, State = #state{socket = Socket,
                                                   module = Module}) ->
      log(debug, ?MODULE, handle_info, [State, self()],
  