Skip to content

Commit

Permalink
Rename cowboy_http_websocket to cowboy_websocket
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Aug 27, 2012
1 parent f39c001 commit 0e3adf1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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!">>),
Expand Down
2 changes: 1 addition & 1 deletion src/cowboy_protocol.erl
Expand Up @@ -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};
Expand Down
2 changes: 1 addition & 1 deletion src/cowboy_http_websocket.erl → src/cowboy_websocket.erl
Expand Up @@ -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]).
Expand Down
2 changes: 1 addition & 1 deletion test/websocket_echo_handler.erl
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion test/websocket_handler.erl
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion test/websocket_handler_init_shutdown.erl
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion test/ws_timeout_hibernate_handler.erl
Expand Up @@ -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).
Expand Down

0 comments on commit 0e3adf1

Please sign in to comment.