C - client (testing system), S - server (a stub)
C: SEW
S: S.
C: .
C: P.
S: .
C: P.
S: .
S: P. <- here is a message that I send via response.data
C: .
C: F. <- after N seconds timeout, because I didn't send FIN-ACK
And what I need:
...
C: P.
S: .
S: P. <- here is a message that I send via response.data
C: .
S: F.
...
p.s.:
S - SYN (starting new connection)
E - ECE (indicate that the TCP peer is ECN capable during 3-way handshake)
W - CWR ("Congestion Window Reduced (CWR) flag is set by the sending host to indicate that it received a TCP segment with the ECE flag set")
. - ACK (Acknowledgment packet received successfully)
P - PUSH (Tells the receiver to process packets instead of buffering them)
F - FIN (Connection termination)