aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-05-16 19:13:36 +0200
committerLoïc Hoguin <[email protected]>2013-05-16 19:13:36 +0200
commitbb89bf6f8d9cb652b758568ead5f8ed21b09add6 (patch)
treef81fd53c949ebc48e2214c62f362a342b1fe5ebe /src/cowboy.erl
parent3d2f7218c5db76f63b268fdd729be138e1c6b963 (diff)
downloadcowboy-bb89bf6f8d9cb652b758568ead5f8ed21b09add6.tar.gz
cowboy-bb89bf6f8d9cb652b758568ead5f8ed21b09add6.tar.bz2
cowboy-bb89bf6f8d9cb652b758568ead5f8ed21b09add6.zip
Use the type ranch:ref() instead of any() where applicable
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index f591333..ecbd96f 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -37,7 +37,7 @@
-export_type([onresponse_fun/0]).
%% @doc Start an HTTP listener.
--spec start_http(any(), non_neg_integer(), any(),
+-spec start_http(ranch:ref(), non_neg_integer(), any(),
cowboy_protocol:opts()) -> {ok, pid()}.
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
@@ -45,7 +45,7 @@ start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
ranch_tcp, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Start an HTTPS listener.
--spec start_https(any(), non_neg_integer(), any(),
+-spec start_https(ranch:ref(), non_neg_integer(), any(),
cowboy_protocol:opts()) -> {ok, pid()}.
start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
@@ -53,7 +53,7 @@ start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
ranch_ssl, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Stop a listener.
--spec stop_listener(any()) -> ok.
+-spec stop_listener(ranch:ref()) -> ok.
stop_listener(Ref) ->
ranch:stop_listener(Ref).
@@ -62,7 +62,7 @@ stop_listener(Ref) ->
%% Allows you to update live an environment value used by middlewares.
%% This function is primarily intended to simplify updating the dispatch
%% list used for routing.
--spec set_env(any(), atom(), any()) -> ok.
+-spec set_env(ranch:ref(), atom(), any()) -> ok.
set_env(Ref, Name, Value) ->
Opts = ranch:get_protocol_options(Ref),
{_, Env} = lists:keyfind(env, 1, Opts),