test quic
This commit is contained in:
parent
eb015f1a67
commit
e7af8a6019
@ -41,7 +41,7 @@ start_link() ->
|
|||||||
init([]) ->
|
init([]) ->
|
||||||
SupFlags = #{strategy => one_for_one, intensity => 1000, period => 3600},
|
SupFlags = #{strategy => one_for_one, intensity => 1000, period => 3600},
|
||||||
{ok, NetworkIds} = sdlan_api:get_all_networks(),
|
{ok, NetworkIds} = sdlan_api:get_all_networks(),
|
||||||
Specs = lists:map(fun child_spec/1, NetworkIds),
|
Specs = lists:map(fun child_spec/1, []),
|
||||||
|
|
||||||
set_network_bind(length(Specs)),
|
set_network_bind(length(Specs)),
|
||||||
|
|
||||||
@ -110,6 +110,8 @@ child_spec(Id) when is_integer(Id) ->
|
|||||||
modules => ['sdlan_network']
|
modules => ['sdlan_network']
|
||||||
}.
|
}.
|
||||||
|
|
||||||
|
set_network_bind(0) ->
|
||||||
|
ok;
|
||||||
set_network_bind(Count) when is_integer(Count) ->
|
set_network_bind(Count) when is_integer(Count) ->
|
||||||
{ok, BindWidth} = application:get_env(sdlan, band_width),
|
{ok, BindWidth} = application:get_env(sdlan, band_width),
|
||||||
NetworkBindWidth = BindWidth div Count,
|
NetworkBindWidth = BindWidth div Count,
|
||||||
|
|||||||
20
apps/sdlan/src/test/sdlan_quicer_test.erl
Normal file
20
apps/sdlan/src/test/sdlan_quicer_test.erl
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
%%%-------------------------------------------------------------------
|
||||||
|
%%% @author anlicheng
|
||||||
|
%%% @copyright (C) 2026, <COMPANY>
|
||||||
|
%%% @doc
|
||||||
|
%%%
|
||||||
|
%%% @end
|
||||||
|
%%% Created : 11. 2月 2026 15:49
|
||||||
|
%%%-------------------------------------------------------------------
|
||||||
|
-module(sdlan_quicer_test).
|
||||||
|
-author("anlicheng").
|
||||||
|
|
||||||
|
%% API
|
||||||
|
-export([test/0]).
|
||||||
|
|
||||||
|
test() ->
|
||||||
|
{ok, Conn} = quicer:connect("http3.is", 443, [{alpn, ["h3"]},
|
||||||
|
{verify, verify_peer},
|
||||||
|
{peer_unidi_stream_count, 3}], 5000),
|
||||||
|
logger:debug("conn is: ~p", [Conn]),
|
||||||
|
quicer:shutdown_connection(Conn).
|
||||||
Loading…
x
Reference in New Issue
Block a user