anchor.diff:  %%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}).
  +  on_close(?DEFAULT_REG_NAME, Callback).
  +
  +%% @doc Add a callback to be called when then connection was closed
  +%%
  +%% This callback will be called when the connection is successfully closed, i.e. after performing the
  +%%websocket closing handshake.
  +%%
  +%% The callback function must be a function which takes one parameter, the payload
  +%%of the close message received from the remote endpoint (if any)
  +-spec on_close(Socket::pid()|atom(), Callback::fun()) -> any().
  +on_close(Socket, Callback) ->
  +  gen_fsm:send_all_state_event(Socket, {on_close, Callback}).
   
   %%%%%%%%%%%%%%%%%%%%%
   %
  
positive.code: %%the error
  -spec on_error(Callback::fun()) -> any().
  on_error(Callback) ->
    gen_fsm:send_all_state_event(wsecli, {on_error, Callback}).
  
  %% @doc Add a callback to be called when a message arrives
  %%
  
negative.code: %% </ul>
  -spec on_message(Callback::fun()) -> any().
  on_message(Callback) ->
    on_message(?DEFAULT_REG_NAME, Callback).
  
  %% @doc Add a callback to be called when a message arrives
  %%
  %% The callback function must be a function which takes two parameters:
  %% <ul>
  %% <li> The first is an atom with values binary or text depending on the type of the websocket message</li>
  %% <li> The second parameter is the message payload</li>
  %% </ul>
  -spec on_message(Socket::atom()|pid(), Callback::fun()) -> any().
  on_message(Socket, Callback) ->
    gen_fsm:send_all_state_event(Socket, {on_message, Callback}).
  
  %% @doc Add a callback to be called when then connection was closed
  %%
  