anchor.diff:          {error, closed} -> closed;
           _ -> exit(normal)
       end.
  +
  +
  +%% Process a key from the websockey handshake, return an integere
  +%% @spec process_key(string()) -> integer
  +process_key(L) ->
  +    {Number,Spaces} = split_key(L, [], 0),
  +    Number div Spaces.
  +
  +    split_key([], DAcc, Spaces) ->
  +        {list_to_integer(lists:reverse(DAcc)), Spaces};
  +    split_key([C|Rest], DAcc, Spaces) when C >= $0, C =< $9 ->
  +        split_key(Rest, [C|DAcc], Spaces);
  +    split_key([32|Rest], DAcc, Spaces) ->
  +        split_key(Rest, DAcc, Spaces+1);
  +    split_key([_|Rest], DAcc, Spaces) ->
  +        split_key(Rest, DAcc, Spaces).
  +
  +
  +
  
positive.code:     init/1, 
      forbidden/2,
      upgrades_provided/2,
  	websocket_start/2,
  	loop/4,
  	send_loop/2,
  	
  	pack_length/1,
  	unpack_length/1
  ]).
  
  -include_lib("webmachine_resource.hrl").
  
negative.code:     B_v = B band 16#7F,
      NewLength = (Length * 128) + B_v,
      case B band 16#80 of
      16#80 ->
          unpack_length(Binary, LenBytes + 1, NewLength);
      0 ->
          {NewLength, LenBytes + 1}
      end.
  
  %% @doc Pack the length in 7 bits bytes
  