On Tue, Nov 28, 2017 at 10:01 PM, <smalln...@gmail.com> wrote: > > I have a requirement that our application needs to listen multiple TCP ports > (mayebe some hundreds). It is not important why we have such a strange > requirements. We can listen more ports and stop some listened ports at > runtime. > > The application is running at Linux and listen by TCP. > > My basic thought is starting multiple TCPListeners. One TCPListener per port > and one goroutine for each TCPListener. > > > But what I want to know there are better solutions than this, for example, > using epoll/ underlying file descriptor?
The go runtime will use epoll internally. Your Go code may as well use multiple TCPListeners. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.