anchor.diff:  
   handle_message(#ws_frame_info{opcode=ping,
                                 data=Data,
  -                              ws_state=State},
  +                              ws_state=WSState},
                   Acc) ->
  -    send(State, {pong, Data}),
  +    do_send(WSState, {pong, Data}),
       Acc;
   
   handle_message(#ws_frame_info{opcode=pong}, Acc) ->
  
positive.code: %%%----------------------------------------------------------------------
  %%% File    : yaws_websockets.erl
  %%% Author  : Davide Marques <nesrait@gmail.com>
  %%% Purpose :
  %%% Created :  18 Dec 2009 by Davide Marques <nesrait@gmail.com>
  %%% Modified:
  %%%----------------------------------------------------------------------
  
  -module(yaws_websockets).
  -author('nesrait@gmail.com').
  
  -include("../include/yaws.hrl").
  -include("../include/yaws_api.hrl").
  
negative.code:      "Sec-WebSocket-Accept: ", AcceptHash , "\r\n",
       "\r\n"].
  
  handle_result_fun(WSState) ->
      fun(Result, Acc) ->
              case Result of
                  {reply, {Type, Data}} ->
                      do_send(WSState, {Type, Data}),
                      Acc;
                  noreply ->
                      Acc;
                  {close, Reason} ->
                      throw({close, Reason})
              end
      end.
  
  do_callback_fun(WSState, CallbackMod) ->
      fun(FrameInfo, {Results, CallbackState}) ->
              case CallbackMod:handle_message(FrameInfo, CallbackState) of
                  {reply, {Type, Data}, NewCallbackState} ->
                      do_send(WSState, {Type, Data}),
                      {Results, NewCallbackState};
                  {noreply, NewCallbackState} ->
                      {Results, NewCallbackState};
                  {close, Reason} ->
                      throw({{close, Reason}, CallbackState})
              end
      end.
  
  