@@ -64,6 +64,12 @@ impl Session {
6464 Session { inner }
6565 }
6666
67+ #[ inline]
68+ /// Get begin frame reference
69+ pub fn frame ( & self ) -> & Begin {
70+ & self . inner . get_ref ( ) . begin
71+ }
72+
6773 #[ inline]
6874 /// Get io tag for current connection
6975 pub fn tag ( & self ) -> & ' static str {
@@ -282,17 +288,12 @@ impl SessionInner {
282288 local : bool ,
283289 sink : ConnectionRef ,
284290 remote_channel_id : u16 ,
285- next_incoming_id : DeliveryNumber ,
286- remote_incoming_window : u32 ,
287- remote_outgoing_window : u32 ,
291+ begin : Begin ,
288292 ) -> SessionInner {
289293 SessionInner {
290- id,
291- sink,
292- next_incoming_id,
293- remote_channel_id,
294- remote_incoming_window,
295- remote_outgoing_window,
294+ next_incoming_id : begin. next_incoming_id ( ) ,
295+ remote_incoming_window : begin. remote_incoming_window ( ) ,
296+ remote_outgoing_window : begin. remote_outgoing_window ( ) ,
296297 flags : if local { Flags :: LOCAL } else { Flags :: empty ( ) } ,
297298 next_outgoing_id : INITIAL_NEXT_OUTGOING_ID ,
298299 unsettled_snd_deliveries : HashMap :: default ( ) ,
@@ -305,6 +306,10 @@ impl SessionInner {
305306 pool_notify : pool:: new ( ) ,
306307 pool_credit : pool:: new ( ) ,
307308 closed : condition:: Condition :: new ( ) ,
309+ id,
310+ sink,
311+ begin,
312+ remote_channel_id,
308313 }
309314 }
310315
0 commit comments