TCP accept and Go concurrency model
问题 Looking at net.TCPListener . One would expect, given the Go concurrency paradigm, for this system functionality to be implemented as a channel, so that you got a chan *net.Conn from a Listen() function, or something similar to that. But it seems Accept() is the way, and that just blocks, just like the system accept. Except it's crippled, because: There is no proper select() you can use with it, because go prefers channels There is no way to set the blocking options for the server sockets. So