QUIC Client Component — sgcQUIC | eSeGeCe

QUIC Client

TsgcQUICClient — a raw QUIC transport client (RFC 9000): open a connection with a single TLS 1.3 handshake, send and receive bytes over one or many streams, with 0-RTT resumption and connection migration, in Delphi, C++ Builder and .NET.

TsgcQUICClient

QUIC without HTTP semantics. Set Host, Port and event handlers, activate the component, then write bytes on a stream. Built on the native OpenSSL 3.5 QUIC engine.

Component class

TsgcQUICClient

Transport

QUIC (RFC 9000) over UDP, TLS 1.3

Languages

Delphi, C++ Builder, .NET

Connect, then write a stream

Assign Host and Port, hook the QUIC events, set Active, then send bytes with WriteData. Call EnableMultiStream and OpenStream for several streams on one connection.

uses
  sgcQUIC_Client;

var
  oClient: TsgcQUICClient;
begin
  oClient := TsgcQUICClient.Create(nil);
  oClient.Host := 'www.example.com';
  oClient.Port := 443;
  oClient.OnQUICConnect    := OnQUICConnectHandler;
  oClient.OnQUICStreamData := OnStreamDataHandler;
  oClient.OnQUICDisconnect := OnQUICDisconnectHandler;

  oClient.Active := True;        // one-flight TLS 1.3 handshake
  oClient.WriteData('ping');      // send bytes on a QUIC stream
end;

// Several independent streams on one connection (builtin engine):
oClient.EnableMultiStream;
oClient.OpenStream;
// includes: sgcQUIC_Client.hpp

TsgcQUICClient *oClient = new TsgcQUICClient(NULL);
oClient->Host = "www.example.com";
oClient->Port = 443;
oClient->OnQUICConnect    = OnQUICConnectHandler;
oClient->OnQUICStreamData = OnStreamDataHandler;
oClient->OnQUICDisconnect = OnQUICDisconnectHandler;

oClient->Active = true;          // one-flight TLS 1.3 handshake
oClient->WriteData("ping");      // send bytes on a QUIC stream

// Several independent streams on one connection (builtin engine):
oClient->EnableMultiStream();
oClient->OpenStream();
using esegece.sgcWebSockets;

var oClient = new TsgcQUICClient();
oClient.Host = "www.example.com";
oClient.Port = 443;
oClient.OnQUICConnect    += OnQUICConnectHandler;
oClient.OnQUICStreamData += OnStreamDataHandler;
oClient.OnQUICDisconnect += OnQUICDisconnectHandler;

oClient.Active = true;          // one-flight TLS 1.3 handshake
oClient.WriteData("ping");      // send bytes on a QUIC stream

// Several independent streams on one connection (builtin engine):
oClient.EnableMultiStream();
oClient.OpenStream();

Key properties & methods

The members you reach for most often.

Connection

Host, Port and Active open and close the QUIC connection; Connect / Disconnect and Start / Stop do it explicitly.

Options

QUICOptions configures ALPN, timeouts and 0-RTT; SSLQUICOptions tunes the TLS 1.3 layer.

Streams

EnableMultiStream plus OpenStream(aUnidirectional) put several independent QUIC streams on one connection (builtin engine).

Send data

WriteData writes a string or TBytes payload onto a stream.

Events

OnQUICConnect, OnQUICStreamData, OnQUICDisconnect and OnQUICException drive the connection lifecycle and inbound data.

Resilience

0-RTT resumption and connection migration keep a session alive across a single round trip and across network changes.

Keep exploring

Online HelpFull API reference and usage guide for sgcQUIC.
All sgcQUIC ComponentsBrowse the full feature matrix of all four components.
Download Free TrialRun the QUIC client against your own server or any QUIC endpoint.
PricingSingle, Team and Site licenses with full source code.
Best value: All-AccessEvery eSeGeCe product, Premium Support included, from €1,059/year.
See All-Access pricing

Ready to Get Started?

Download the free trial and start sending traffic over QUIC in Delphi, C++ Builder and .NET.