aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-05-16 17:56:45 +0200
committerLoïc Hoguin <[email protected]>2013-05-16 17:56:45 +0200
commit6d1344319a208412afa3d32f98d1b9043ff90eb7 (patch)
tree1bff5ba801a9466fee239689676c46724c697d19 /src/cowboy.erl
parent2e787fed568eac202d04912422bb2bcf811f9ed1 (diff)
downloadcowboy-6d1344319a208412afa3d32f98d1b9043ff90eb7.tar.gz
cowboy-6d1344319a208412afa3d32f98d1b9043ff90eb7.tar.bz2
cowboy-6d1344319a208412afa3d32f98d1b9043ff90eb7.zip
Add cowboy_protocol:opts() type
Should improve the detection of wrong protocol options.
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index 375f924..f591333 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -37,14 +37,16 @@
-export_type([onresponse_fun/0]).
%% @doc Start an HTTP listener.
--spec start_http(any(), non_neg_integer(), any(), any()) -> {ok, pid()}.
+-spec start_http(any(), non_neg_integer(), any(),
+ cowboy_protocol:opts()) -> {ok, pid()}.
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors,
ranch_tcp, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Start an HTTPS listener.
--spec start_https(any(), non_neg_integer(), any(), any()) -> {ok, pid()}.
+-spec start_https(any(), non_neg_integer(), any(),
+ cowboy_protocol:opts()) -> {ok, pid()}.
start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors,