You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/Settings.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,7 @@ These parameters are accessed by calling [GetParam](./api/GetParam.md) or [SetPa
118
118
|`QUIC_PARAM_GLOBAL_EXECUTION_CONFIG`<br> 9 (preview) | QUIC_GLOBAL_EXECUTION_CONFIG | Both | Globally configure the execution model used for QUIC. Must be set before opening registration. |
119
119
|`QUIC_PARAM_GLOBAL_TLS_PROVIDER`<br> 10 | QUIC_TLS_PROVIDER | Get-Only | The TLS provider being used by MsQuic for the TLS handshake. |
120
120
|`QUIC_PARAM_GLOBAL_STATELESS_RESET_KEY`<br> 11 | uint8_t[]| Set-Only | Globally change the stateless reset key for all subsequent connections. |
121
+
|`QUIC_PARAM_GLOBAL_STATISTICS_V2_SIZES`<br> 12 | uint32_t[]| Get-only | Array of well-known sizes for each version of the QUIC_STATISTICS_V2 struct. The output array length is variable; pass a buffer of uint32_t and check BufferLength for the number of sizes returned. See GetParam documentation for usage details. |
121
122
|`QUIC_PARAM_GLOBAL_VERSION_NEGOTIATION_ENABLED`<br> (preview) | uint8_t (BOOLEAN) | Both | Globally enable the version negotiation extension for all client and server connections. |
Copy file name to clipboardExpand all lines: docs/api/GetParam.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,38 @@ Sample of double-call:
71
71
}
72
72
```
73
73
74
+
# Special Parameters
75
+
76
+
## QUIC_PARAM_GLOBAL_STATISTICS_V2_SIZES
77
+
78
+
Returns an array of well-known sizes (in bytes) for each version of the `QUIC_STATISTICS_V2` struct. This allows applications to determine the correct buffer size for statistics queries, even as new versions are added in future MsQuic releases.
79
+
80
+
> **Note** - Most applications should **not** leverage this and instead directly call to query the `QUIC_STATISTICS_V2`. This API is only necessary for layers on top of MsQuic that need to pass through this information to additional layers on top of them.
81
+
82
+
-**Type:**`uint32_t[]` (array of struct sizes)
83
+
-**Get-only**
84
+
-**Variable-length:** The number of sizes returned may change in future versions. The caller should pass a buffer of `uint32_t` and use the double-call pattern to determine the required buffer size.
85
+
86
+
**Sample usage:**
87
+
```c
88
+
uint32_t Sizes[8]; // Large enough for future growth
89
+
uint32_t BufferLength = sizeof(Sizes);
90
+
QUIC_STATUS Status =
91
+
MsQuic->GetParam(
92
+
NULL,
93
+
QUIC_PARAM_GLOBAL_STATISTICS_V2_SIZES,
94
+
&BufferLength,
95
+
Sizes);
96
+
if (Status == QUIC_STATUS_BUFFER_TOO_SMALL) {
97
+
// BufferLength is set to required size (in bytes)
#defineQUIC_PARAM_GLOBAL_STATELESS_RESET_KEY 0x0100000B // uint8_t[] - Array size is QUIC_STATELESS_RESET_KEY_LENGTH
949
+
#defineQUIC_PARAM_GLOBAL_STATISTICS_V2_SIZES 0x0100000C // uint32_t[] - Array of sizes for each QUIC_STATISTICS_V2 version. Get-only. Pass a buffer of uint32_t, output count is variable. See documentation for details.
0 commit comments