Browse Source

Rename cowboy_http_websocket to cowboy_websocket

Loïc Hoguin 12 years ago
parent
commit
0e3adf1fee

+ 1 - 1
README.md

@@ -198,7 +198,7 @@ Websocket would look like this:
     websocket_info/3, websocket_terminate/3]).
 
 init({tcp, http}, Req, Opts) ->
-    {upgrade, protocol, cowboy_http_websocket}.
+    {upgrade, protocol, cowboy_websocket}.
 
 websocket_init(TransportName, Req, _Opts) ->
     erlang:start_timer(1000, self(), <<"Hello!">>),

+ 1 - 1
src/cowboy_protocol.erl

@@ -327,7 +327,7 @@ handler_before_loop(HandlerState, Req, State) ->
 	State2 = handler_loop_timeout(State),
 	handler_loop(HandlerState, Req, State2).
 
-%% Almost the same code can be found in cowboy_http_websocket.
+%% Almost the same code can be found in cowboy_websocket.
 -spec handler_loop_timeout(#state{}) -> #state{}.
 handler_loop_timeout(State=#state{loop_timeout=infinity}) ->
 	State#state{loop_timeout_ref=undefined};

+ 1 - 1
src/cowboy_http_websocket.erl → src/cowboy_websocket.erl

@@ -17,7 +17,7 @@
 %% When using websockets, make sure that the crypto application is
 %% included in your release. If you are not using releases then there
 %% is no need for concern as crypto is already included.
--module(cowboy_http_websocket).
+-module(cowboy_websocket).
 
 %% API.
 -export([upgrade/4]).

+ 1 - 1
test/websocket_echo_handler.erl

@@ -8,7 +8,7 @@
 	websocket_info/3, websocket_terminate/3]).
 
 init(_Any, _Req, _Opts) ->
-	{upgrade, protocol, cowboy_http_websocket}.
+	{upgrade, protocol, cowboy_websocket}.
 
 handle(_Req, _State) ->
 	exit(badarg).

+ 1 - 1
test/websocket_handler.erl

@@ -8,7 +8,7 @@
 	websocket_info/3, websocket_terminate/3]).
 
 init(_Any, _Req, _Opts) ->
-	{upgrade, protocol, cowboy_http_websocket}.
+	{upgrade, protocol, cowboy_websocket}.
 
 handle(_Req, _State) ->
 	exit(badarg).

+ 1 - 1
test/websocket_handler_init_shutdown.erl

@@ -8,7 +8,7 @@
 	websocket_info/3, websocket_terminate/3]).
 
 init(_Any, _Req, _Opts) ->
-	{upgrade, protocol, cowboy_http_websocket}.
+	{upgrade, protocol, cowboy_websocket}.
 
 handle(_Req, _State) ->
 	exit(badarg).

+ 1 - 1
test/ws_timeout_hibernate_handler.erl

@@ -8,7 +8,7 @@
 	websocket_info/3, websocket_terminate/3]).
 
 init(_Any, _Req, _Opts) ->
-	{upgrade, protocol, cowboy_http_websocket}.
+	{upgrade, protocol, cowboy_websocket}.
 
 handle(_Req, _State) ->
 	exit(badarg).