Expose Wire Format Error Code on Close (#2852)

This commit is contained in:
Nick Banks 2022-06-29 13:42:48 -04:00 коммит произвёл GitHub
Родитель 5c5e242ffd
Коммит ec7001ef25
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
5 изменённых файлов: 12 добавлений и 1 удалений

Просмотреть файл

@ -18,6 +18,7 @@ typedef struct QUIC_CONNECTION_EVENT {
} CONNECTED;
struct {
QUIC_STATUS Status;
QUIC_UINT62 ErrorCode; // Wire format error code.
} SHUTDOWN_INITIATED_BY_TRANSPORT;
struct {
QUIC_UINT62 ErrorCode;
@ -113,6 +114,10 @@ This event is delivered whenever the transport (e.g. QUIC layer) determines the
The platform status code that indicates the reason for the shutdown.
`ErrorCode`
The wire format error code that indicates the reason for the shutdown.
## QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_PEER
This event is delivered when the peer application has terminated the application, with an application's protocol specific, 62-bit error code.

Просмотреть файл

@ -1401,6 +1401,7 @@ QuicConnIndicateShutdownBegin(
} else {
Event.Type = QUIC_CONNECTION_EVENT_SHUTDOWN_INITIATED_BY_TRANSPORT;
Event.SHUTDOWN_INITIATED_BY_TRANSPORT.Status = Connection->CloseStatus;
Event.SHUTDOWN_INITIATED_BY_TRANSPORT.ErrorCode = Connection->CloseErrorCode;
QuicTraceLogConnVerbose(
IndicateShutdownByTransport,
Connection,

Просмотреть файл

@ -2035,6 +2035,9 @@ namespace Microsoft.Quic
{
[NativeTypeName("HRESULT")]
internal int Status;
[NativeTypeName("QUIC_UINT62")]
internal ulong ErrorCode;
}
internal partial struct _SHUTDOWN_INITIATED_BY_PEER_e__Struct

Просмотреть файл

@ -1051,6 +1051,7 @@ typedef struct QUIC_CONNECTION_EVENT {
} CONNECTED;
struct {
QUIC_STATUS Status;
QUIC_UINT62 ErrorCode; // Wire format error code.
} SHUTDOWN_INITIATED_BY_TRANSPORT;
struct {
QUIC_UINT62 ErrorCode;

Просмотреть файл

@ -803,7 +803,8 @@ pub struct ConnectionEventConnected {
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ConnectionEventConnectionShutdownByTransport {
pub status: u64,
pub status: u32,
pub error_code: u62,
}
#[repr(C)]