TsgcHTTP3Client › Methods › TunnelSend

TunnelSend Method

Sends raw bytes as an HTTP/3 DATA frame on an open Extended CONNECT tunnel.

Syntax

procedure TunnelSend(const aData: TBytes);

Parameters

NameTypeDescription
aDataconst TBytesRaw bytes to tunnel. They are wrapped in a single HTTP/3 DATA frame and written to the tunnel stream.

Return Value

None.

Remarks

TunnelSend writes tunnelled bytes to the stream opened by ExtendedConnect, wrapping them in a DATA frame as required by RFC 9114 Section 4.4. The payload is passed through unchanged, so the framing of whatever protocol runs inside the tunnel is the caller responsibility.

The method is a no-op when no tunnel is established, so check that ExtendedConnect returned True before calling it.

To receive the bytes coming back, call TunnelPump and handle OnTunnelData.

This member is currently available in the Delphi/C++Builder implementation only.

Example



oClient.TunnelSend(TEncoding.UTF8.GetBytes('PING'));

Back to Methods