anchor.diff:  %% @doc Receive Message from client and send it to XNest
   websocket_handle({text, Msg}, Req, State ) ->
   	XNestPid = State#state.xnest_pid,
  -lager:info("some one send a message:~ts", [Msg]),
  +lager:info("ip: ~p send a message:~ts", [element(8, Req), Msg]),
   	xnest:input(XNestPid, {self(), text, {'normal', Msg}}),			%% Use xnest API to send message
   	{ok, Req, State};
   
  
positive.code: parse_xnest_name(Req) ->
  	cowboy_req:qs_val(<<"xnest">>, Req, <<>>).
  
  %% @doc Join a xnest 
  -spec join_xnest(binary()) -> {ok, pid()}.
  join_xnest(XNestName) ->
  	{ok, XNestPid} = xnest_manager:get_xnest(XNestName),   %% I can know what format will be return by xnest_manager
  	{ok, JoinResult} = xnest:join(XNestPid, self()),
  	xnest:input(XNestPid, {self(), text, {'join', JoinResult}}),			%% Use xnest API to send join message
  	{ok, XNestPid}.
  
  
negative.code: %% @private
  websocket_init(_TransportName, Req, _Opts) ->
  	{XNestName, Req1} = parse_xnest_name(Req),
  	{NickName, Req2} = parse_nickname(Req1),
  	self() ! {'self'},		%% send a command to self 
  	{ok, XNestPid} = join_xnest(XNestName, NickName),
  	State = #state{
  		nickname	= NickName,
  		xnest_name	= XNestName,
  		xnest_pid	= XNestPid
  	},
  	Req3 = cowboy_req:set_resp_header(<<"access-control-allow-origin">>, <<"*">>, Req2),
  	self() ! {'member_count'},		%% send a command to self 
  	{ok, Req3, State}.
  
  
  
  