network-programmingtcp

How does TCP PSH work?


PSH is a way to send data via TCP. Besides that, I can find very little info on how to implement it properly.

Here is what interests me:

  1. Let's say, server window is 8000 bytes, and I send 2 requests with 150 and 600 bytes. Do I get some sort of confirmation that the data has been received? Can I somehow trigger a confirmacion?

  2. I've seen some ACK packets, which does not contain PSH but do contain some sort of payload data (Wireshark marks it as "TCP segment data"). Is this data passed on to user, and if it is, why do we need PSH flag?


Solution

  • TCP PSH generally doesn't 'work' at all. Berkely-derived TCP implementations completely ignore it.

    Source: W.R. Stevens, TCP/IP Illustrated, vol I: 20.5 PUSH Flag.