A TCP connection has flags that are used to indidcate a connection’s state. The connection’s state allows you to troubleshoot problems and let’s you know how to handle a connection. Two of the more commonly used flags for this purpose are the “PSH” and ACK” flags.

ACK (Acknowledgement)

The ACK (Acknowledgement) flag acknowledges packets retrieved by the host. The ACK flag gets set if the acknowledgment number field contains a valid acknowledgment number.

PSH (Push)

The Transport layer waits for the application layer to send enough data equal to the maximum segment size which leads to the number of packets transmitted on the network minimizing. If no minimizing were to occur, it can disrupt some applications. The transport layer also buffers packets before sending them to the application layer. This is the problem the PSH (Push) flag solves. When PSH is set on the transport layer, the segment is sent to the network layer when a single is received from the application layer. The Reciever transport layer then forwards the data to the application layer without needing to buffer them.