TsgcQUICClient › Methods › Connected
Returns whether the QUIC connection is currently established.
function Connected: Boolean;
True while the QUIC connection is open and ready to send data, otherwise False. (Boolean)
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.
if not oClient.Connected then
oClient.Connect;
oClient.WriteData(TEncoding.UTF8.GetBytes('Hello QUIC'));