anchor.diff:  handle_cast({ wait_headers, Seen }, WebSocket) ->
   	{ noreply, WebSocket#websocket{ data = Seen, connecting = true }};
   
  -handle_cast({ upgrade, Data }, WebSocket = #websocket{ socket = Socket, module = Module, function = Function }) ->
  +handle_cast({ upgrade, Data }, WebSocket = #websocket{ socket = Socket }) ->
   	%% parse the headers
   	Headers = parse_headers(Data),
   	%% determine which protocol to use, draft00 is now deprecated
  
positive.code: 	%% send the handshake
  	case gen_tcp:send(Socket,Handshake) of
  		ok -> 
  			spawn(Module,Function, [ self(), connected ]),
  			{ noreply, WebSocket#websocket{ 
  				protocol = Protocol,
  				headers = Headers, 
  
negative.code: 	io:format("Unknown message ~p~n", [ Any ]),
  	{ stop, unknown_message, WebSocket };
  
  handle_info({ close, _Socket }, WebSocket) ->
  	%% after a second stop the websocket
  	timer:apply_after(1000, ?MODULE, stop, [ self() ]),
  	{ noreply, WebSocket };
  