r/cpp • • Feb 27 '26

Good, basic* game networking library?

I want to get a simple server-client system up for a multiplayer game, and I've been poking around to find some simple networking implementations but haven't found many. I've used enet itself before but I would like something a little more friendly in terms of usability? I know it's good but something about it is not terribly enjoyable to use for games.

13 Upvotes

21 comments sorted by

View all comments

Show parent comment

9

u/TheVoidInMe Feb 28 '26

Cool!

void LocalUserInput_Kill()
{
// Does not work.  We won't clean up, we'll just nuke the process.
//	g_bQuit = true;
//	_close( fileno( stdin ) );
//
//	if ( s_pThreadUserInput )
//	{
//		s_pThreadUserInput->join();
//		delete s_pThreadUserInput;
//		s_pThreadUserInput = nullptr;
//	}
}

// You really gotta wonder what kind of pedantic garbage was
// going through the minds of people who designed std::string
// that they decided not to include trim.
// https://stackoverflow.com/questions/216823/whats-the-best-way-to-trim-stdstring

I love Valve, haha

7

u/Chaosvex Mar 02 '26

I think I've left similar comments but about splitting.

"How many C++ developers does it take to split a string?", followed by a Stack Overflow link with a worrying number of developers arguing over the best way to do it.