aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-06-07 18:40:44 +0200
committerLoïc Hoguin <[email protected]>2013-06-07 18:40:44 +0200
commita8737cb763e908dbcd19e2e42bab6afe65e4ba7d (patch)
treebeb6e7ddc178b00ab654c8b4abe18e253b8a6cb0 /src
parentbe0f7a214cec085860344f2edf9b2d8f2dc1e127 (diff)
parente4f407e426902f16e55f2c2f749622aeb4461683 (diff)
downloadcowboy-a8737cb763e908dbcd19e2e42bab6afe65e4ba7d.tar.gz
cowboy-a8737cb763e908dbcd19e2e42bab6afe65e4ba7d.tar.bz2
cowboy-a8737cb763e908dbcd19e2e42bab6afe65e4ba7d.zip
Merge branch 'types' of git://github.com/lavrin/cowboy
Diffstat (limited to 'src')
-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 = [