aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-08-27 12:46:42 +0200
committerLoïc Hoguin <[email protected]>2012-08-27 12:50:00 +0200
commitcc2e084d456c99b3d71f09c08f516195b6015dae (patch)
tree7fafcb37fe43e06c80032fd52c238f460c93d9ad /test
parent10adcdbc7dce733fa300fffdd11ce24ae7c17e38 (diff)
downloadcowboy-cc2e084d456c99b3d71f09c08f516195b6015dae.tar.gz
cowboy-cc2e084d456c99b3d71f09c08f516195b6015dae.tar.bz2
cowboy-cc2e084d456c99b3d71f09c08f516195b6015dae.zip
Update behaviours for R15B+
This effectively drops the R14B compatibility. The cowboy_req:req() type will be introduced in a future commit. It refers to the #http_req{} record.
Diffstat (limited to 'test')
-rw-r--r--test/http_handler_loop_timeout.erl1
-rw-r--r--test/websocket_echo_handler.erl2
-rw-r--r--test/websocket_handler.erl2
-rw-r--r--test/websocket_handler_init_shutdown.erl2
-rw-r--r--test/ws_timeout_hibernate_handler.erl2
5 files changed, 5 insertions, 4 deletions
diff --git a/test/http_handler_loop_timeout.erl b/test/http_handler_loop_timeout.erl
index 76d6ea8..0e8c78f 100644
--- a/test/http_handler_loop_timeout.erl
+++ b/test/http_handler_loop_timeout.erl
@@ -1,6 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.
-module(http_handler_loop_timeout).
+-behaviour(cowboy_loop_handler).
-export([init/3, info/3, terminate/2]).
init({_, http}, Req, _) ->
diff --git a/test/websocket_echo_handler.erl b/test/websocket_echo_handler.erl
index b06c1e7..f5905c8 100644
--- a/test/websocket_echo_handler.erl
+++ b/test/websocket_echo_handler.erl
@@ -2,7 +2,7 @@
-module(websocket_echo_handler).
-behaviour(cowboy_http_handler).
--behaviour(cowboy_http_websocket_handler).
+-behaviour(cowboy_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
diff --git a/test/websocket_handler.erl b/test/websocket_handler.erl
index abb4967..5a484a0 100644
--- a/test/websocket_handler.erl
+++ b/test/websocket_handler.erl
@@ -2,7 +2,7 @@
-module(websocket_handler).
-behaviour(cowboy_http_handler).
--behaviour(cowboy_http_websocket_handler).
+-behaviour(cowboy_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
diff --git a/test/websocket_handler_init_shutdown.erl b/test/websocket_handler_init_shutdown.erl
index aa9e056..9d6c475 100644
--- a/test/websocket_handler_init_shutdown.erl
+++ b/test/websocket_handler_init_shutdown.erl
@@ -2,7 +2,7 @@
-module(websocket_handler_init_shutdown).
-behaviour(cowboy_http_handler).
--behaviour(cowboy_http_websocket_handler).
+-behaviour(cowboy_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).
diff --git a/test/ws_timeout_hibernate_handler.erl b/test/ws_timeout_hibernate_handler.erl
index 777948a..871a686 100644
--- a/test/ws_timeout_hibernate_handler.erl
+++ b/test/ws_timeout_hibernate_handler.erl
@@ -2,7 +2,7 @@
-module(ws_timeout_hibernate_handler).
-behaviour(cowboy_http_handler).
--behaviour(cowboy_http_websocket_handler).
+-behaviour(cowboy_websocket_handler).
-export([init/3, handle/2, terminate/2]).
-export([websocket_init/3, websocket_handle/3,
websocket_info/3, websocket_terminate/3]).