mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Remove NumAcceptors argument from start_clear/tls
They are now cowboy:start_clear/3 and cowboy:start_tls/3. The NumAcceptors argument can be specified via the num_acceptor transport option. Ranch has been updated to 1.4.0 to that effect.
This commit is contained in:
parent
767da623f1
commit
6f7b59886e
30 changed files with 45 additions and 83 deletions
|
@ -20,19 +20,19 @@
|
|||
%% Listeners initialization.
|
||||
|
||||
init_http(Ref, ProtoOpts, Config) ->
|
||||
{ok, _} = cowboy:start_clear(Ref, 100, [{port, 0}], ProtoOpts),
|
||||
{ok, _} = cowboy:start_clear(Ref, [{port, 0}], ProtoOpts),
|
||||
Port = ranch:get_port(Ref),
|
||||
[{type, tcp}, {protocol, http}, {port, Port}, {opts, []}|Config].
|
||||
|
||||
init_https(Ref, ProtoOpts, Config) ->
|
||||
Opts = ct_helper:get_certs_from_ets(),
|
||||
{ok, _} = cowboy:start_tls(Ref, 100, Opts ++ [{port, 0}], ProtoOpts),
|
||||
{ok, _} = cowboy:start_tls(Ref, Opts ++ [{port, 0}], ProtoOpts),
|
||||
Port = ranch:get_port(Ref),
|
||||
[{type, ssl}, {protocol, http}, {port, Port}, {opts, Opts}|Config].
|
||||
|
||||
init_http2(Ref, ProtoOpts, Config) ->
|
||||
Opts = ct_helper:get_certs_from_ets(),
|
||||
{ok, _} = cowboy:start_tls(Ref, 100, Opts ++ [{port, 0}], ProtoOpts),
|
||||
{ok, _} = cowboy:start_tls(Ref, Opts ++ [{port, 0}], ProtoOpts),
|
||||
Port = ranch:get_port(Ref),
|
||||
[{type, ssl}, {protocol, http2}, {port, Port}, {opts, Opts}|Config].
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue