* @param {SessionOptions} options * @param {ProcessSessionOptions} [config] * @returns {SessionOptions}
(options, config = kEmptyObject)
| 5154 | * @returns {SessionOptions} |
| 5155 | */ |
| 5156 | function processSessionOptions(options, config = kEmptyObject) { |
| 5157 | validateObject(options, 'options'); |
| 5158 | const { |
| 5159 | endpoint, |
| 5160 | reuseEndpoint = true, |
| 5161 | version, |
| 5162 | minVersion, |
| 5163 | preferredAddressPolicy = 'ignore', |
| 5164 | transportParams = kEmptyObject, |
| 5165 | qlog = false, |
| 5166 | sessionTicket, |
| 5167 | token, |
| 5168 | maxPayloadSize, |
| 5169 | unacknowledgedPacketThreshold = 0, |
| 5170 | handshakeTimeout, |
| 5171 | initialRtt, |
| 5172 | keepAlive, |
| 5173 | maxStreamWindow, |
| 5174 | maxWindow, |
| 5175 | cc, |
| 5176 | datagramDropPolicy = 'drop-oldest', |
| 5177 | drainingPeriodMultiplier = 3, |
| 5178 | maxDatagramSendAttempts = 5, |
| 5179 | streamIdleTimeout, |
| 5180 | verifyPeer = 'auto', |
| 5181 | // HTTP/3 application-specific options. Nested under `application` |
| 5182 | // to separate protocol-specific settings from transport-level ones. |
| 5183 | application = kEmptyObject, |
| 5184 | // Session callbacks that can be set at construction time to avoid |
| 5185 | // race conditions with events that fire during or immediately |
| 5186 | // after the handshake. |
| 5187 | onerror, |
| 5188 | onstream, |
| 5189 | ondatagram, |
| 5190 | ondatagramstatus, |
| 5191 | onpathvalidation, |
| 5192 | onsessionticket, |
| 5193 | onversionnegotiation, |
| 5194 | onhandshake, |
| 5195 | onnewtoken, |
| 5196 | onearlyrejected, |
| 5197 | onorigin, |
| 5198 | ongoaway, |
| 5199 | onkeylog, |
| 5200 | onqlog, |
| 5201 | onapplication, |
| 5202 | // Application level options changed, e.g. HTTP/3 settings related |
| 5203 | // Stream-level callbacks. |
| 5204 | onheaders, |
| 5205 | ontrailers, |
| 5206 | oninfo, |
| 5207 | onwanttrailers, |
| 5208 | } = options; |
| 5209 | |
| 5210 | const { |
| 5211 | forServer = false, |
| 5212 | targetAddress, |
| 5213 | } = config; |
no test coverage detected
searching dependent graphs…