TsgcHTTP3Server › 이벤트 › OnH3Disconnect
HTTP/3 연결이 닫힐 때 발생합니다.
property OnH3Disconnect: TsgcQUICServerDisconnectEvent;
// TsgcQUICServerDisconnectEvent = procedure(Sender: TObject; const aConnection: TsgcQUICServerConnection; aCode: Int64; const aReason: string) of object
—
| Name | Type | 설명 |
|---|---|---|
aConnection | const TsgcQUICServerConnection | 닫힌 연결입니다. |
aCode | Int64 | 닫기 코드. 정상 닫기는 0이며, 그렇지 않으면 기저 오류 코드. |
aReason | const string | 사용 가능한 경우, 사람이 읽을 수 있는 연결 해제 이유입니다. |
OnH3Disconnect는 클라이언트가 HTTP/3 연결을 닫거나 전송 오류로 인해 연결이 끊어질 때 발생합니다. 이벤트 후에 연결 객체가 해제되므로 애플리케이션이 보유한 연결별 상태는 여기서 폐기해야 합니다. 정상적인 피어 시작 종료는 aCode = 0과 빈 aReason을 보고합니다. 오류 종료는 OpenSSL 오류 코드와 짧은 설명을 보고합니다.
procedure OnH3DisconnectEvent(Sender: TObject; const aConnection:
TsgcQUICServerConnection; aCode: Int64; const aReason: string);
begin
Log('HTTP/3 client disconnected: ' + aReason);
end;