@@ -231,22 +231,22 @@ const {
231231/**
232232 * Called when the Endpoint receives a new server-side Session.
233233 * @callback OnSessionCallback
234- * @param {Session } session
235- * @param {Endpoint } endpoint
234+ * @param {QuicSession } session
235+ * @param {QuicEndpoint } endpoint
236236 * @returns {void }
237237 */
238238
239239/**
240240 * @callback OnStreamCallback
241241 * @param {QuicStream } stream
242- * @param {Session } session
242+ * @param {QuicSession } session
243243 * @returns {void }
244244 */
245245
246246/**
247247 * @callback OnDatagramCallback
248248 * @param {Uint8Array } datagram
249- * @param {Session } session
249+ * @param {QuicSession } session
250250 * @param {boolean } early
251251 * @returns {void }
252252 */
@@ -255,7 +255,7 @@ const {
255255 * @callback OnDatagramStatusCallback
256256 * @param {bigint } id
257257 * @param {'lost'|'acknowledged' } status
258- * @param {Session } session
258+ * @param {QuicSession } session
259259 * @returns {void }
260260 */
261261
@@ -267,14 +267,14 @@ const {
267267 * @param {SocketAddress } oldLocalAddress
268268 * @param {SocketAddress } oldRemoteAddress
269269 * @param {boolean } preferredAddress
270- * @param {Session } session
270+ * @param {QuicSession } session
271271 * @returns {void }
272272 */
273273
274274/**
275275 * @callback OnSessionTicketCallback
276276 * @param {object } ticket
277- * @param {Session } session
277+ * @param {QuicSession } session
278278 * @returns {void }
279279 */
280280
@@ -283,7 +283,7 @@ const {
283283 * @param {number } version
284284 * @param {number[] } requestedVersions
285285 * @param {number[] } supportedVersions
286- * @param {Session } session
286+ * @param {QuicSession } session
287287 * @returns {void }
288288 */
289289
@@ -296,7 +296,7 @@ const {
296296 * @param {string } validationErrorReason
297297 * @param {number } validationErrorCode
298298 * @param {boolean } earlyDataAccepted
299- * @param {Session } session
299+ * @param {QuicSession } session
300300 * @returns {void }
301301 */
302302
@@ -443,9 +443,9 @@ function processTlsOptions(tls) {
443443 ciphers = DEFAULT_CIPHERS ,
444444 groups = DEFAULT_GROUPS ,
445445 keylog = false ,
446- verifyClient = true ,
446+ verifyClient = false ,
447447 tlsTrace = false ,
448- verifyPrivateKey = true ,
448+ verifyPrivateKey = false ,
449449 keys,
450450 certs,
451451 ca,
@@ -538,7 +538,7 @@ function processTlsOptions(tls) {
538538class QuicStream {
539539 /** @type {object } */
540540 #handle;
541- /** @type {Session } */
541+ /** @type {QuicSession } */
542542 #session;
543543 /** @type {QuicStreamStats } */
544544 #stats;
@@ -560,7 +560,7 @@ class QuicStream {
560560 /**
561561 * @param {StreamCallbackConfiguration } config
562562 * @param {object } handle
563- * @param {Session } session
563+ * @param {QuicSession } session
564564 */
565565 constructor ( config , handle , session , direction ) {
566566 validateObject ( config , 'config' ) ;
@@ -607,7 +607,7 @@ class QuicStream {
607607 /** @type {QuicStreamState } */
608608 get state ( ) { return this . #state; }
609609
610- /** @type {Session } */
610+ /** @type {QuicSession } */
611611 get session ( ) { return this . #session; }
612612
613613 /** @type {bigint } */
@@ -657,8 +657,8 @@ class QuicStream {
657657 }
658658}
659659
660- class Session {
661- /** @type {Endpoint } */
660+ class QuicSession {
661+ /** @type {QuicEndpoint } */
662662 #endpoint = undefined ;
663663 /** @type {boolean } */
664664 #isPendingClose = false ;
@@ -695,7 +695,7 @@ class Session {
695695 * @param {SessionCallbackConfiguration } config
696696 * @param {StreamCallbackConfiguration } streamConfig
697697 * @param {object } [handle]
698- * @param {Endpoint } [endpoint]
698+ * @param {QuicEndpoint } [endpoint]
699699 */
700700 constructor ( config , streamConfig , handle , endpoint ) {
701701 validateObject ( config , 'config' ) ;
@@ -753,7 +753,7 @@ class Session {
753753 /** @type {QuicSessionState } */
754754 get state ( ) { return this . #state; }
755755
756- /** @type {Endpoint } */
756+ /** @type {QuicEndpoint } */
757757 get endpoint ( ) { return this . #endpoint; }
758758
759759 /** @type {Path } */
@@ -976,7 +976,7 @@ class Session {
976976 depth : options . depth == null ? null : options . depth - 1 ,
977977 } ;
978978
979- return `Session ${ inspect ( {
979+ return `QuicSession ${ inspect ( {
980980 closed : this . closed ,
981981 closing : this . #isPendingClose,
982982 destroyed : this . destroyed ,
@@ -1039,7 +1039,7 @@ function validateEndpointConfig(config) {
10391039 return config ;
10401040}
10411041
1042- class Endpoint {
1042+ class QuicEndpoint {
10431043 /** @type {SocketAddress|undefined } */
10441044 #address = undefined ;
10451045 /** @type {boolean } */
@@ -1054,7 +1054,7 @@ class Endpoint {
10541054 #pendingClose;
10551055 /** @type {any } */
10561056 #pendingError = undefined ;
1057- /** @type {Session [] } */
1057+ /** @type {QuicSession [] } */
10581058 #sessions = [ ] ;
10591059 /** @type {QuicEndpointState } */
10601060 #state;
@@ -1235,7 +1235,7 @@ class Endpoint {
12351235 * Initiates a session with a remote endpoint.
12361236 * @param {SocketAddress } address
12371237 * @param {SessionOptions } [options]
1238- * @returns {Session }
1238+ * @returns {QuicSession }
12391239 */
12401240 connect ( address , options = kEmptyObject ) {
12411241 if ( this . #isClosedOrClosing) {
@@ -1278,7 +1278,7 @@ class Endpoint {
12781278 if ( handle === undefined ) {
12791279 throw new ERR_QUIC_CONNECTION_FAILED ( ) ;
12801280 }
1281- const session = new Session ( this . #sessionConfig, this . #streamConfig, handle , this ) ;
1281+ const session = new QuicSession ( this . #sessionConfig, this . #streamConfig, handle , this ) ;
12821282 ArrayPrototypePush ( this . #sessions, session ) ;
12831283 return session ;
12841284 }
@@ -1393,7 +1393,7 @@ class Endpoint {
13931393 }
13941394
13951395 [ kNewSession ] ( handle ) {
1396- const session = new Session ( this . #sessionConfig, this . #streamConfig, handle , this ) ;
1396+ const session = new QuicSession ( this . #sessionConfig, this . #streamConfig, handle , this ) ;
13971397 ArrayPrototypePush ( this . #sessions, session ) ;
13981398 this . #onsession( session , this ) ;
13991399 }
@@ -1409,7 +1409,7 @@ class Endpoint {
14091409 depth : options . depth == null ? null : options . depth - 1 ,
14101410 } ;
14111411
1412- return `Endpoint ${ inspect ( {
1412+ return `QuicEndpoint ${ inspect ( {
14131413 address : this . address ,
14141414 busy : this . busy ,
14151415 closed : this . closed ,
@@ -1423,7 +1423,7 @@ class Endpoint {
14231423 }
14241424} ;
14251425
1426- ObjectDefineProperties ( Endpoint , {
1426+ ObjectDefineProperties ( QuicEndpoint , {
14271427 CC_ALGO_RENO : {
14281428 __proto__ : null ,
14291429 value : CC_ALGO_RENO ,
@@ -1467,7 +1467,7 @@ ObjectDefineProperties(Endpoint, {
14671467 enumerable : true ,
14681468 } ,
14691469} ) ;
1470- ObjectDefineProperties ( Session , {
1470+ ObjectDefineProperties ( QuicSession , {
14711471 DEFAULT_CIPHERS : {
14721472 __proto__ : null ,
14731473 value : DEFAULT_CIPHERS ,
@@ -1485,8 +1485,8 @@ ObjectDefineProperties(Session, {
14851485} ) ;
14861486
14871487module . exports = {
1488- Endpoint ,
1489- Session ,
1488+ QuicEndpoint ,
1489+ QuicSession ,
14901490 QuicStream,
14911491 QuicSessionState,
14921492 QuicSessionStats,
0 commit comments