TsgcQUICClient › Methods › Connected

Connected Method

Returns whether the QUIC connection is currently established.

Syntax

function Connected: Boolean;

Return Value

True while the QUIC connection is open and ready to send data, otherwise False. (Boolean)

Remarks

Connected reports the live state of the QUIC connection. It returns True once the connection has been established (after OnQUICConnect has fired) and False after it has been closed (after OnQUICDisconnect). Use it to check the link before calling WriteData, or to decide whether a Connect is still needed.

Example


if not oClient.Connected then
  oClient.Connect;
oClient.WriteData(TEncoding.UTF8.GetBytes('Hello QUIC'));

Back to Methods