anchor.diff:  -module(wsecli).
   -behaviour(gen_fsm).
   
  --include("wsecli.hrl").
  +%-include("wsecli.hrl").
  +-include_lib("wsock/include/wsock.hrl").
   
   -export([start/3, stop/0, send/1]).
   -export([on_open/1, on_error/1, on_message/1, on_close/1]).
  
positive.code:   {stop, normal, {ok, closing}, StateData};
  
  handle_sync_event(stop, _From, open, StateData) ->
    Message = wsecli_message:encode([], close),
    case gen_tcp:send(StateData#data.socket, Message) of
      ok ->
        gen_fsm:start_timer(?CLOSE_HANDSHAKE_TIMEOUT, waiting_close_reply),
  
negative.code:   {next_state, open, StateData};
  
  open({send, Data}, StateData) ->
    Message = wsock_message:encode(Data, [mask, text]),
    case gen_tcp:send(StateData#data.socket, Message) of
      ok ->
        ok;
  