Permalink
Browse files

sockjs/sockjs-protocol#46 - introduce new /cookie_needed_echo service

  • Loading branch information...
1 parent 2cc0e97 commit 758ad9979f58318e5d1611ea41279ca29735451c @majek majek committed Mar 28, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 examples/cowboy_test_server.erl
@@ -16,7 +16,7 @@ main(_) ->
StateEcho = sockjs_handler:init_state(
<<"/echo">>, fun service_echo/3, state,
- [{cookie_needed, true}, {response_limit, 4096}]),
+ [{response_limit, 4096}]),
StateClose = sockjs_handler:init_state(
<<"/close">>, fun service_close/3, state, []),
StateAmplify = sockjs_handler:init_state(
@@ -26,13 +26,18 @@ main(_) ->
StateDWSEcho = sockjs_handler:init_state(
<<"/disabled_websocket_echo">>, fun service_echo/3, state,
[{websocket, false}]),
+ StateCNEcho = sockjs_handler:init_state(
+ <<"/cookie_needed_echo">>, fun service_echo/3, state,
+ [{cookie_needed, true}]),
VRoutes = [{[<<"echo">>, '...'], sockjs_cowboy_handler, StateEcho},
{[<<"close">>, '...'], sockjs_cowboy_handler, StateClose},
{[<<"amplify">>, '...'], sockjs_cowboy_handler, StateAmplify},
{[<<"broadcast">>, '...'], sockjs_cowboy_handler, StateBroadcast},
{[<<"disabled_websocket_echo">>, '...'], sockjs_cowboy_handler,
StateDWSEcho},
+ {[<<"cookie_needed_echo">>, '...'], sockjs_cowboy_handler,
+ StateCNEcho},
{'_', ?MODULE, []}],
Routes = [{'_', VRoutes}], % any vhost

0 comments on commit 758ad99

Please sign in to comment.