Implementing TCP in Rust (part 3)

Profile Picture
- Published on May 11, 2019馃審 Public

In this stream, we continue to expand on our user-space TCP stack from last time. This time, we're implementing support for application-controlled shutdown, as well as reading and writing data. Most of the challenge here is to handle TCP retransmissions correctly, both so that we don't yield duplicate data, and so that the data the application sends is reliably communicated to the other side. We got shutdown and reads working completely, but sadly writes did not work even though it looks like we are following the protocol correctly. Suggestions welcome! This is the last stream (for now) in the "Implementing TCP" series. While we didn't end up with a complete implementation, I think we have gone through most of the interesting Rust parts of the problem. I also want to keep moving to new topics so that there's something for everyone in the audience. The deeper we get in a series, the more technical and less approachable it tends to get. The next stream will hopefully be in ~2 weeks, and you can vote on what you'd like the next stream topic to be at You can find the implementation here: See the live version with (most) comments at