@@ -3,11 +3,11 @@ const infoTextMap: Record<number, string | null> = {
3
3
1 : 'Step 2: Server responds with SYN-ACK packet' ,
4
4
2 : 'Step 3: Client sends ACK packet, completing the three-way handshake' ,
5
5
3 : 'Step 4: Connection established, data transfer begins' ,
6
- 4 : null ,
7
- 5 : null ,
8
- 6 : null ,
9
- 7 : null ,
10
- 8 : null ,
6
+ 4 : null , // Data packet 1
7
+ 5 : null , // Data packet 2
8
+ 6 : null , // Data packet 3
9
+ 7 : null , // Data packet 4
10
+ 8 : 'Step 9: Final data packet sent' ,
11
11
9 : 'Step 10: Client initiates connection termination with FIN packet' ,
12
12
10 : 'Step 11: Server acknowledges with ACK' ,
13
13
11 : 'Step 12: Server sends its own FIN packet' ,
@@ -18,7 +18,9 @@ const infoTextMap: Record<number, string | null> = {
18
18
function getInfoText ( step : number ) {
19
19
const infoText = infoTextMap [ step ]
20
20
21
- return infoText ? infoText : `Data packet ${ step - 2 } being transferred`
21
+ return infoText
22
+ ? infoText
23
+ : `Step ${ step + 1 } : Data packet ${ step - 3 } being transferred`
22
24
}
23
25
24
26
export default getInfoText
0 commit comments