---
# System prepended metadata

title: 50.012 Lecture 10

---

# 50.012 Lecture 10

## TCP Flow Control
![](https://i.imgur.com/Gxmnwj2.png)

![](https://i.imgur.com/q6rxWv2.png)

The information about the receiver buffer is sent by the receiver by including rwnd value in the TCP header of receiver-to-sender segments.
This is so that the sender will regulate the sending speed.
`RcvBuffer` is set via socket option. A lot of OS usually automatically adjust this value.

Sender limits the amount of unACKed data to receiver's rwnd value.
This is to guarantee receiver buffer will not overflow.

Even when `rwnd` is zero, in practice, TCP will just announce a very small value (e.g. 1).