anchor.diff:  code_change(OldVsn, StateName, StateData, Extra) ->
     code_change.
   
  -%
  -% Internal
  -%
  +%%%%%%%%%%%%%%%%%%%%%
  +%
  +% GEN FSM INTERNAL
  +%
  +%%%%%%%%%%%%%%%%%%%%%
   -spec process_messages(Messages :: list(#message{}), StateData :: #data{}) -> #data{}.
   process_messages([], StateData) ->
     StateData;
  
positive.code: closed(Event, StateData) ->
    {stop, normal, StateData}.
  
  %
  % GEN_FSM behaviour callbacks
  %
  handle_event({on_error, Callback}, StateName, StateData) ->
    Callbacks = StateData#data.cb#callbacks{on_error = Callback},
    {next_state, StateName, StateData#data{cb = Callbacks} };
  
negative.code:     fragmented_message = undefined :: #message{}
    }).
  
  %%%%%%%%%%%%%%%%%%%%%
  %
  % PUBLIC API
  %
  %%%%%%%%%%%%%%%%%%%%%
  
  -spec start(Host::string(), Port::integer(), Resource::string()) -> pid().
  start(Host, Port, Path)->
    {ok, Pid} = gen_fsm:start_link({local, wsecli}, ?MODULE, {Host, Port, Path}, [{timeout, 5000}]),
  