xflagstudio / requiem Goto Github PK
View Code? Open in Web Editor NEWWebTransport (over HTTP/3) framework for Elixir
License: MIT License
WebTransport (over HTTP/3) framework for Elixir
License: MIT License
Firefox 114 introduced support for WebTransport, so I wanted to use requiem as the server.
I cloned the latest git for requiem, and in the examples/requiem_echo
directory I issued the commands:
mix deps.get
CERT=/home/fri/mkcert/localhost.pem PRIV_KEY=/home/fri/mkcert/localhost-key.pem mix run --no-halt
Before doing so, I created a cert file for localhost using mkcert (in the directory /home/fri/mkcert
)
mkcert install
mkcert localhost
I headed my browser to:
https://googlechrome.github.io/samples/webtransport/client.html
and used https://localhost:3000/
as the URL.
After clicking on "Connect", the Event log reads as follows:
- Initiating connection...
- Connection failed. WebTransportError: WebTransport connection rejected
Meanwhile, the stdout and the log on the Elixir side of things reads like this:
09:26:12.411 [debug] num_socket: 8
09:26:12.955 [info] <Requiem.Transport> socket started on 0.0.0.0:3000
09:27:11.127 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @received: 127.0.0.1:47671
09:27:11.127 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @init
09:27:11.127 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @token_missing_packet
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @send
09:27:11.147 [debug] <Elixir.Requiem.SenderWorker:#PID<0.251.0>> @send
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to 127.0.0.1:47671 (117)
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to: succeeded
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @received: 127.0.0.1:47671
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @init
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @retry_packet
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @validate
09:27:11.147 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @validate_success
09:27:11.151 [debug] <Elixir.Requiem.ConnectionSupervisor> create cnonection: DCID:85F1CE29EECFB75A0F6ED53A26E821B014D0728C
09:27:11.153 [debug] <Elixir.Requiem.Connection> start_link:85F1CE29EECFB75A0F6ED53A26E821B014D0728C
09:27:11.154 [debug] <Elixir.Requiem.Connection:85F1CE29> @init
09:27:11.155 [debug] <Elixir.Requiem.Connection:85F1CE29> @acccept: completed
09:27:11.155 [debug] <Elixir.Requiem.Connection:85F1CE29> @init: registered
09:27:11.155 [debug] <Elixir.Requiem.Connection> process_packet
09:27:11.155 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet
09:27:11.156 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet: completed, next_timeout: 998
09:27:11.157 [debug] <Elixir.Requiem.SenderWorker:#PID<0.251.0>> @drain
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to 127.0.0.1:47671 (1200)
09:27:11.157 [debug] <Elixir.Requiem.SenderWorker:#PID<0.251.0>> @drain
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to: succeeded
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to 127.0.0.1:47671 (517)
07:27:11 [DEBUG] (12) requiem_nif::socket: send_to: succeeded
09:27:11.157 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @received: 127.0.0.1:47671
09:27:11.157 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @regular: handshake
09:27:11.157 [debug] <Elixir.Requiem.Connection> process_packet
09:27:11.157 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet
09:27:11.158 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet: completed, next_timeout: 29999
09:27:11.158 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @received: 127.0.0.1:47671
09:27:11.158 [debug] <Elixir.Requiem.DispatcherWorker:#PID<0.332.0>> @regular: handshake
09:27:11.158 [debug] <Elixir.Requiem.Connection> process_packet
09:27:11.158 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet
09:27:11.158 [debug] <Elixir.Requiem.Connection:85F1CE29> @packet: completed, next_timeout: 9
09:27:11.168 [debug] <Elixir.Requiem.Connection:85F1CE29> @timeout
09:27:11.168 [debug] <Elixir.Requiem.Connection:85F1CE29> @timeout: already closed
09:27:11.168 [debug] <Elixir.Requiem.Connection:85F1CE29> @close
09:27:11.168 [debug] <Elixir.Requiem.Connection:85F1CE29> @close: already closed, set delayed close
09:27:11.168 [debug] <Elixir.Requiem.Connection:85F1CE29> @delayed_closed
09:27:11.170 [debug] <Elixir.Requiem.Connection:85F1CE29> @terminate :normal
So it looks like it's connecting, but in the handshake there is a packet with a very small timeout value, so the connection times out.
Is it possible that requiem is using an older spec of the WebTransport protocol, thus it misinterprets what Firefox is sending?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.