cowboy
cowboy copied to clipboard
HTTP/3
Hello @essen , i 'll try to create http/3, but doesnt work. the server always running, but doesnt access by browser. and this is my code
start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [{"/", hello_handler, []}]}
]),
TransOpts = #{
socket_opts => [
{port, 8181},
{certfile, "/ssl/cert.pem"},
{keyfile, "/ssl/key.pem"}
]
},
Lst = cowboy:start_quic(
h3,
TransOpts,
#{
env => #{dispatch => Dispatch}
}
),
io:format("Listener ~p~n", [Lst]),
{ok, Listener} = Lst,
Port = quicer:sockname(Listener),
io:format("Port ~p~n", [Port]),
persistent_term:put({cowboy_quic, h3}, Listener),
qtrial_sup:start_link().
i use cowboy master for that it is wrong or not? thanx before.