mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Rename cowboy_http_websocket to cowboy_websocket
This commit is contained in:
parent
f39c001c03
commit
0e3adf1fee
7 changed files with 7 additions and 7 deletions
|
@ -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!">>),
|
||||
|
|
|
@ -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};
|
||||
|
|
|
@ -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]).
|
|
@ -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).
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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).
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue