quic_lib 1.12.0 copy "quic_lib: ^1.12.0" to clipboard
quic_lib: ^1.12.0 copied to clipboard

A pure-Dart QUIC, HTTP/3, WebTransport, and libp2p transport stack.

example/README.md

quic_lib Examples #

This directory contains minimal example applications demonstrating how to use the quic_lib package.

Examples #

  • echo_client.dart — Demonstrates creating a [QuicEndpoint], connecting to a server, opening a bidirectional stream, and staging data through the QuicSendStream API.
  • echo_server.dart — Demonstrates binding a [QuicEndpoint] to a local address, polling active connections, registering each connection in its own isolate, and printing incoming stream data.
  • http3_client.dart — Demonstrates wrapping a [QuicConnection] in an [Http3Connection], exchanging SETTINGS, sending an HTTP/3 request, and reading the staged response.

Running the examples #

Echo server #

dart run echo_server.dart

The server will listen on 127.0.0.1:4433. Press Ctrl+C to stop it gracefully.

Echo client #

In a separate terminal, run:

dart run echo_client.dart

The client will bind to an ephemeral port, connect to 127.0.0.1:4433, open a bidirectional stream, and stage a "Hello, QUIC!" message via the stream API.

HTTP/3 client #

dart run http3_client.dart

The client will bind to an ephemeral port, connect to 127.0.0.1:4433, and stage an HTTP/3 GET request over a new bidirectional stream.

Note #

These examples are scaffolding that demonstrate the public API surface. Some end-to-end wire paths (such as fully completing a handshake over UDP) may still be under active development. See the package README and doc/ folder for the full architecture and roadmap.

0
likes
0
points
1.41k
downloads

Documentation

Documentation

Publisher

unverified uploader

Weekly Downloads

A pure-Dart QUIC, HTTP/3, WebTransport, and libp2p transport stack.

Repository (GitHub)
View/report issues

Topics

#networking #quic #http3 #webtransport #libp2p

License

unknown (license)

Dependencies

asn1lib, cryptography, logging, meta, pointycastle, x509

More

Packages that depend on quic_lib