(options, requestListener)
| 3446 | |
| 3447 | class Http2SecureServer extends TLSServer { |
| 3448 | constructor(options, requestListener) { |
| 3449 | options = initializeTLSOptions(options); |
| 3450 | super(options, connectionListener); |
| 3451 | this[kOptions] = options; |
| 3452 | this[kSessions] = new SafeSet(); |
| 3453 | this.timeout = 0; |
| 3454 | this.on('newListener', setupCompat); |
| 3455 | if (options.allowHTTP1 === true) { |
| 3456 | storeHTTPOptions.call(this, { ...options, ...options.http1Options }); |
| 3457 | this.shouldUpgradeCallback = function() { |
| 3458 | return this.listenerCount('upgrade') > 0; |
| 3459 | }; |
| 3460 | this.on('listening', setupConnectionsTracking); |
| 3461 | } |
| 3462 | if (typeof requestListener === 'function') |
| 3463 | this.on('request', requestListener); |
| 3464 | this.on('tlsClientError', onErrorSecureServerSession); |
| 3465 | } |
| 3466 | |
| 3467 | setTimeout(msecs, callback) { |
| 3468 | this.timeout = msecs; |
nothing calls this directly
no test coverage detected