Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does TCP PSH work?

Tags:

networking

tcp

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?

like image 935
Arsen Zahray Avatar asked Dec 27 '22 15:12

Arsen Zahray


1 Answers

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.

like image 90
user207421 Avatar answered Jan 11 '23 11:01

user207421