anchor.diff:  %% The callback function must be a function which takes no parameters
   -spec on_open(Callback::fun()) -> any().
   on_open(Callback) ->
  -  gen_fsm:send_event(wsecli, {on_open, Callback}).
  +  on_open(?DEFAULT_REG_NAME, Callback).
  +
  +%% @doc Add a callback to be called when a connection is opened
  +%%
  +%% This callback is called when the connection is opened (after a successful websocket handshake)
  +%%or inmediatelly if called while in the open state. Adding it not it connecting or open state will
  +%%raise an error.
  +%%
  +%% The callback function must be a function which takes no parameters
  +-spec on_open(Socket::pid()|atom(), Callback::fun()) -> any().
  +on_open(Socket, Callback) ->
  +  gen_fsm:send_event(Socket, {on_open, Callback}).
   
   %% @doc Add a callback to be called when an error occurs
   %%
  
positive.code: %%of the close message received from the remote endpoint (if any)
  -spec on_close(Callback::fun()) -> any().
  on_close(Callback) ->
    gen_fsm:send_all_state_event(wsecli, {on_close, Callback}).
  
  %%%%%%%%%%%%%%%%%%%%%
  %
  
negative.code: %%closing handshake is tryed and only after that the connection is closed.
  -spec stop() -> ok.
  stop() ->
    stop(?DEFAULT_REG_NAME).
  
  %% @doc This function will stop the websocket client
  %%
  %% Calling this function doesn't mean that the connection will be inmediatelly closed. A
  %% closing handshake is tryed and only after that the connection is closed. Parameters
  %% <ul>
  %% <li>Socket, a pid or atom. Handle to socket that is to be closed.</li>
  %% </ul>
  -spec stop(Socket::pid()|atom()) -> ok.
  stop(Socket) ->
    gen_fsm:sync_send_all_state_event(Socket, stop).
  
  %% @doc Send data to a remote endpoint
  %%
  