0038 - Custom C++ Web Server: fixing issues in NetworkConnection class

Опубликовано: 28 Март 2026
на канале: Rhymu's Videos
142
5

This is #38 in my series of live (Twitch) coding streams, working on writing my own web server and service framework in C++.

This stream I tackled a bug in my NetworkConnection class which was either causing or triggering a complete system crash for me! I'm not sure why, but my part of the code was horribly inefficient, so I fixed that, making a custom "data queue" class rather than the naive approach (std::deque of bytes) to hold data to be sent on the connection.

I also added code to handle the graceful closing of connections (send remainder of data, then signal a shutdown, then wait for the peer to close their side too). -- Watch live at   / rhymu8354