Does TCP Receive Window Size header field include the bytes in segment headers?

network-programming, network-protocols, networking, sockets, tcp

Solution

It applies to the payload only. The sender can always transmit ACKs, FINs, RSTs, etc., with no payload.

Problem

I'm working on an implementation of TCP for a class and I'm wondering what the Window Size field actually mean. I understand that the window size is the number of bytes, but does that number of bytes apply to: - the payload of the TCP Segment, not including the header or to - the entire TCP Segment, including the header? Thus far, I've looked on Wikipedia: RFC 793 states that: The window indicates an allowed number of octets that the sender may transmit before receiving further permission. RFC 2581 states that: receiver's advertised window (rwnd) is a receiver-side limit on the amount of outstanding data Neither of these make it particularly clear. Anyone?

Original source