In socket programming, what is usually called the entity that receives socket messages? My socket class is called “EventHandler” and I hate that name a lot. 😅

@brunoph Call it SocketListener if it's for a single listening socket.

Otherwise, if it's just the place where you call poll() for all your fds, typical names are: EventLoop, MainLoop, Dispatcher, Reactor...


@brunoph By the way, designing a scalable, multi-threaded, portable event loop is tricky. Consider taking one of these solutions (or at least study them):

· · Web · 1 · 3 · 1

@codewiz Thank you! And absolutely, I’m using Starscream. I wouldn’t trust myself to write socket code. 😝

I was just wondering what kind of names were usual because I couldn’t come up with anything that I liked, but what I’m implementing is the higher, business-logic level code.

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!