anchor.diff:  init(close, _From, {State, _Opts, _Timeout}) ->
   	{reply, ok, closed, State}.
   
  +%% @private
   init(_Msg, State) ->
   	{next_state, init, State}.
   
  
positive.code: recv(Socket, Timeout) ->
  	gen_fsm:sync_send_event(Socket, {recv, Timeout}).
  
  %% @doc set the controlling process to a new owner. Can only suceede if
  %% called from the current owner.
  -spec controlling_process(Socket :: websocket(), NewOwner :: pid()) -> 'ok' | {'error', 'not_owner'}.
  controlling_process(Socket, NewOwner) ->
  
negative.code: -export([init/1, handle_event/3, handle_sync_event/4, handle_info/3, 
  	terminate/3, code_change/4]).
  % public api
  -export([connect/2, connect/3, send/2, send/3, recv/1, recv/2,
  	controlling_process/2, close/1, shutdown/2, setopts/2, ping/1, ping/2]).
  
  -type mode() :: 'passive' | 'once' | 'active'.
  