@@ -1373,6 +1373,7 @@ impl Connection {
1373
1373
space : SpaceId ,
1374
1374
ack : frame:: Ack ,
1375
1375
) -> Result < ( ) , TransportError > {
1376
+ // TODO(@divma): check path id
1376
1377
if ack. largest >= self . spaces [ space] . next_packet_number {
1377
1378
return Err ( TransportError :: PROTOCOL_VIOLATION ( "unsent packet acked" ) ) ;
1378
1379
}
@@ -2788,7 +2789,11 @@ impl Connection {
2788
2789
}
2789
2790
self . streams . received_stop_sending ( id, error_code) ;
2790
2791
}
2791
- Frame :: RetireConnectionId { sequence } => {
2792
+ Frame :: RetireConnectionId ( frame:: RetireConnectionId {
2793
+ path_id : _,
2794
+ sequence,
2795
+ } ) => {
2796
+ // TODO(@divma): use path id
2792
2797
let allow_more_cids = self
2793
2798
. local_cid_state
2794
2799
. on_cid_retirement ( sequence, self . peer_params . issue_cids_limit ( ) ) ?;
@@ -2942,6 +2947,18 @@ impl Connection {
2942
2947
migration_observed_addr = Some ( observed)
2943
2948
}
2944
2949
}
2950
+ Frame :: PathAbandon ( _) => {
2951
+ // TODO(@divma): jump ship?
2952
+ }
2953
+ Frame :: PathAvailable ( _) => {
2954
+ // TODO(@divma): do stuff
2955
+ }
2956
+ Frame :: MaxPathId ( _) => {
2957
+ // TODO(@divma): do stuff
2958
+ }
2959
+ Frame :: PathsBlocked ( _) => {
2960
+ // TODO(@divma): do stuff
2961
+ }
2945
2962
}
2946
2963
}
2947
2964
@@ -3304,6 +3321,7 @@ impl Connection {
3304
3321
}
3305
3322
3306
3323
// NEW_CONNECTION_ID
3324
+ // TODO(@divma): need to change this; add a decent size fn
3307
3325
while buf. len ( ) + 44 < max_size {
3308
3326
let issued = match space. pending . new_cids . pop ( ) {
3309
3327
Some ( x) => x,
@@ -3315,6 +3333,7 @@ impl Connection {
3315
3333
"NEW_CONNECTION_ID"
3316
3334
) ;
3317
3335
frame:: NewConnectionId {
3336
+ path_id : None , // TODO(@divma): multipath!
3318
3337
sequence : issued. sequence ,
3319
3338
retire_prior_to : self . local_cid_state . retire_prior_to ( ) ,
3320
3339
id : issued. id ,
@@ -3326,15 +3345,19 @@ impl Connection {
3326
3345
}
3327
3346
3328
3347
// RETIRE_CONNECTION_ID
3348
+ // TODO(@divma): buf size bounds are now wrong
3329
3349
while buf. len ( ) + frame:: RETIRE_CONNECTION_ID_SIZE_BOUND < max_size {
3330
- let seq = match space. pending . retire_cids . pop ( ) {
3350
+ let sequence = match space. pending . retire_cids . pop ( ) {
3331
3351
Some ( x) => x,
3332
3352
None => break ,
3333
3353
} ;
3334
- trace ! ( sequence = seq, "RETIRE_CONNECTION_ID" ) ;
3335
- buf. write ( frame:: FrameType :: RETIRE_CONNECTION_ID ) ;
3336
- buf. write_var ( seq) ;
3337
- sent. retransmits . get_or_create ( ) . retire_cids . push ( seq) ;
3354
+ trace ! ( sequence, "RETIRE_CONNECTION_ID" ) ;
3355
+ frame:: RetireConnectionId {
3356
+ path_id : None , // TODO(@divma): multipath!
3357
+ sequence,
3358
+ }
3359
+ . write ( buf) ;
3360
+ sent. retransmits . get_or_create ( ) . retire_cids . push ( sequence) ;
3338
3361
self . stats . frame_tx . retire_connection_id += 1 ;
3339
3362
}
3340
3363
@@ -3401,7 +3424,8 @@ impl Connection {
3401
3424
delay_micros
3402
3425
) ;
3403
3426
3404
- frame:: Ack :: encode ( delay as _ , space. pending_acks . ranges ( ) , ecn, buf) ;
3427
+ // TODO(@divma): connect here when path management is ready
3428
+ frame:: Ack :: encode ( None , delay as _ , space. pending_acks . ranges ( ) , ecn, buf) ;
3405
3429
stats. frame_tx . acks += 1 ;
3406
3430
}
3407
3431
@@ -3441,6 +3465,7 @@ impl Connection {
3441
3465
trace ! ( "negotiated max idle timeout {:?}" , self . idle_timeout) ;
3442
3466
if let Some ( ref info) = params. preferred_address {
3443
3467
self . rem_cids . insert ( frame:: NewConnectionId {
3468
+ path_id : None , // TODO(@divma): use
3444
3469
sequence : 1 ,
3445
3470
id : info. connection_id ,
3446
3471
reset_token : info. stateless_reset_token ,
0 commit comments