mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Merge branch 'types' of git://github.com/lavrin/cowboy
This commit is contained in:
commit
a8737cb763
1 changed files with 4 additions and 3 deletions
|
@ -39,7 +39,7 @@
|
||||||
|
|
||||||
%% @doc Start an HTTP listener.
|
%% @doc Start an HTTP listener.
|
||||||
-spec start_http(ranch:ref(), non_neg_integer(), ranch_tcp:opts(),
|
-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)
|
start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
|
||||||
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
||||||
ranch:start_listener(Ref, NbAcceptors,
|
ranch:start_listener(Ref, NbAcceptors,
|
||||||
|
@ -47,14 +47,15 @@ start_http(Ref, NbAcceptors, TransOpts, ProtoOpts)
|
||||||
|
|
||||||
%% @doc Start an HTTPS listener.
|
%% @doc Start an HTTPS listener.
|
||||||
-spec start_https(ranch:ref(), non_neg_integer(), ranch_ssl:opts(),
|
-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)
|
start_https(Ref, NbAcceptors, TransOpts, ProtoOpts)
|
||||||
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
||||||
ranch:start_listener(Ref, NbAcceptors,
|
ranch:start_listener(Ref, NbAcceptors,
|
||||||
ranch_ssl, TransOpts, cowboy_protocol, ProtoOpts).
|
ranch_ssl, TransOpts, cowboy_protocol, ProtoOpts).
|
||||||
|
|
||||||
%% @doc Start a SPDY listener.
|
%% @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)
|
start_spdy(Ref, NbAcceptors, TransOpts, ProtoOpts)
|
||||||
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
when is_integer(NbAcceptors), NbAcceptors > 0 ->
|
||||||
TransOpts2 = [
|
TransOpts2 = [
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue