@@ -39,15 +39,15 @@ try {
3939}
4040
4141// Wrapper object for sctp-connection and tcp/udp-connection
42- function InConnection ( prot , minport , maxport ) {
42+ function InConnection ( prot , minport , maxport , ticket ) {
4343 var conn = null ;
4444 var protocol = "quic" ;
4545
4646 switch ( prot ) {
4747 case 'tcp' :
4848 case 'udp' :
4949 protocol = prot ;
50- conn = new InternalIn ( prot , minport , maxport ) ;
50+ conn = new InternalIn ( prot , minport , maxport , ticket ) ;
5151 break ;
5252 case 'quic' :
5353 conn = new quicIO . in ( cf , kf ) ;
@@ -78,7 +78,7 @@ function InConnection(prot, minport, maxport) {
7878}
7979
8080// Wrapper object for sctp-connection and tcp/udp-connection
81- function OutConnection ( prot , minport , maxport ) {
81+ function OutConnection ( prot , minport , maxport , ticket ) {
8282 var that = { } ;
8383 var conn = null ;
8484 var protocol = "quic" ;
@@ -111,7 +111,7 @@ function OutConnection(prot, minport, maxport) {
111111 } else if ( protocol === 'quic' ) {
112112 conn = new quicIO . out ( connectOpt . ip , connectOpt . port ) ;
113113 } else {
114- conn = new InternalOut ( protocol , connectOpt . ip , connectOpt . port ) ;
114+ conn = new InternalOut ( protocol , connectOpt . ip , connectOpt . port , ticket ) ;
115115 }
116116 } ;
117117
@@ -139,6 +139,7 @@ module.exports = function() {
139139 var prot = internalOpt . protocol ;
140140 var minport = internalOpt . minport || 0 ;
141141 var maxport = internalOpt . maxport || 0 ;
142+ var ticket = internalOpt . ticket ;
142143
143144 if ( preparedSet [ connId ] ) {
144145 log . warn ( 'Internal Connection already prepared:' , connId ) ;
@@ -147,7 +148,9 @@ module.exports = function() {
147148 // right call sequence in upper layer.
148149 return preparedSet [ connId ] . connection . getListeningPort ( ) ;
149150 }
150- var conn = ( direction === 'in' ) ? InConnection ( prot , minport , maxport ) : OutConnection ( prot , minport , maxport ) ;
151+ var conn = ( direction === 'in' )
152+ ? InConnection ( prot , minport , maxport , ticket )
153+ : OutConnection ( prot , minport , maxport , ticket ) ;
151154
152155 preparedSet [ connId ] = { connection : conn , direction : direction } ;
153156 return conn . getListeningPort ( ) ;
0 commit comments