0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 20:30:23 +00:00

Rename cowboy_http_websocket to cowboy_websocket

This commit is contained in:
Loïc Hoguin 2012-08-27 14:00:28 +02:00
parent f39c001c03
commit 0e3adf1fee
7 changed files with 7 additions and 7 deletions

View file

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

View file

@ -327,7 +327,7 @@ handler_before_loop(HandlerState, Req, State) ->
State2 = handler_loop_timeout(State), State2 = handler_loop_timeout(State),
handler_loop(HandlerState, Req, State2). 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{}. -spec handler_loop_timeout(#state{}) -> #state{}.
handler_loop_timeout(State=#state{loop_timeout=infinity}) -> handler_loop_timeout(State=#state{loop_timeout=infinity}) ->
State#state{loop_timeout_ref=undefined}; State#state{loop_timeout_ref=undefined};

View file

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

View file

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

View file

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

View file

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

View file

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