Back to Browse

Asynchronous TCP/IP, Part 10

237 views
Streamed live on Mar 4, 2022
1:04:09

This series: Live coding to https://github.com/StephenClearyExamples/TcpChat Developing an asynchronous TCP/IP server and client. Discussing TCP/IP protocol design. Discussing some harder concepts in async/await. Part 10: Developing a minimal correct implementation. Sending keepalive messages. Defining a minimal correct implementation: message framing, always be reading, and keepalive messages. Note: The parsing code still has a bug introduced in Part 3: it can call AdvanceTo multiple times on the same buffer if it has multiple messages. This bug was fixed after this series: https://github.com/StephenClearyExamples/TcpChat/commit/f4c8b1c5564ccc0a50f04f11fc93409df4d0e303 Code changes: https://github.com/StephenClearyExamples/TcpChat/compare/day-09...day-10 Resources used in this video: .NET source code for BoundedChannel.TryWrite: https://github.com/dotnet/runtime/blob/57bfe474518ab5b7cfe6bf7424a79ce3af9d6657/src/libraries/System.Threading.Channels/src/System/Threading/Channels/BoundedChannel.cs#L354 0:00 Intro 1:14 Defining the keepalive message type 2:55 Serializing keepalive messages 5:35 Sending keepalive messages 19:55 Testing with Clumsy 24:35 Minimal correct implementation 27:00 TCP/IP applications are never simple 31:53 Planning the next steps 35:20 Cleaning up the serialization code 1:02:11 Summary 1:03:10 Testing 1:03:32 Outtro

Download

0 formats

No download links available.

Asynchronous TCP/IP, Part 10 | NatokHD