Server listening on multiple sockets – Code Review

I am trying to get a server listening on multiple sockets. The first approach that comes to mind is to create a goroutine for each port and block the main go routine with a channel or wait group. It seems to work at first but opening more than one TCP connection for each client suddenly breaks everything and freezes my PC.

I’d love to hear if you know how to achieve this and I’d also appreciate any pointers to resources to look at.

Thank you


Leave a Comment