TsgcHTTP3Client › Methods › TunnelSend
Sends raw bytes as an HTTP/3 DATA frame on an open Extended CONNECT tunnel.
procedure TunnelSend(const aData: TBytes);
| Name | Type | Description |
|---|---|---|
aData | const TBytes | Raw bytes to tunnel. They are wrapped in a single HTTP/3 DATA frame and written to the tunnel stream. |
None.
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.
oClient.TunnelSend(TEncoding.UTF8.GetBytes('PING'));