aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy.erl
diff options
context:
space:
mode:
authorRadosław Szymczyszyn <[email protected]>2013-03-29 16:38:30 +0100
committerRadosław Szymczyszyn <[email protected]>2013-06-02 00:40:22 +0200
commite4f407e426902f16e55f2c2f749622aeb4461683 (patch)
treeff545c6f8e150c070fe5fd3dab26f152ae63c3a7 /src/cowboy.erl
parentc1a1fd125d8b0559f182bd8fc10de18f7259047d (diff)
downloadcowboy-e4f407e426902f16e55f2c2f749622aeb4461683.tar.gz
cowboy-e4f407e426902f16e55f2c2f749622aeb4461683.tar.bz2
cowboy-e4f407e426902f16e55f2c2f749622aeb4461683.zip
Fix cowboy:start_http/https/spdy typespecs
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 = [