aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy.erl')
-rw-r--r--src/cowboy.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/cowboy.erl b/src/cowboy.erl
index 16445e1..abc7911 100644
--- a/src/cowboy.erl
+++ b/src/cowboy.erl
@@ -39,7 +39,7 @@
%% @doc Start an HTTP listener.
-spec start_http(ranch:ref(), non_neg_integer(), ranch_tcp:opts(),
- cowboy_protocol:opts()) -> {ok, pid()}.
+ cowboy_protocol:opts()) -> {ok, pid()} | {error, any()}.
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors,
@@ -47,14 +47,15 @@ start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
%% @doc Start an HTTPS listener.
-spec start_https(ranch:ref(), non_neg_integer(), ranch_ssl:opts(),
- cowboy_protocol:opts()) -> {ok, pid()}.
+ cowboy_protocol:opts()) -> {ok, pid()} | {error, any()}.
start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
ranch:start_listener(Ref, NbAcceptors,
ranch_ssl, TransOpts, cowboy_protocol, ProtoOpts).
%% @doc Start a SPDY listener.
--spec start_spdy(any(), non_neg_integer(), any(), any()) -> {ok, pid()}.
+-spec start_spdy(ranch:ref(), non_neg_integer(), ranch_ssl:opts(),
+ cowboy_spdy:opts()) -> {ok, pid()} | {error, any()}.
start_spdy(Ref, NbAcceptors, TransOpts, ProtoOpts)
when is_integer(NbAcceptors), NbAcceptors > 0 ->
TransOpts2 = [