This is a created article in which the information may have evolved or changed.
Golang implementation of the concurrency socket is very simple, can take advantage of the channel concurrency of Go, each Chan holds a socket handle read and write, very direct, do not use their own EPOLL,IOCP implementation. But what about the efficiency of EPOLL,IOCP go processing sockets? I'm curious, because, EPOLL,IOCP is the standard form of dealing with concurrent sockets.
I followed the source code of Go, and finally found that the original at the bottom, go is also used Eoll KQUEUE,IOCP and other IO model read and write socket, so, efficiency God horse certainly no problem.
Specific analysis, from the Net.go read function to see, found before read is to Prepare (fd_poll_runtime.go), Prepare will call Runtime_pollreset, This function is a run-time function, in the NETPOLL.GOC, the specific implementation of the platform has a relationship, the implementation of win in NETPOLL_WINDOWS.C, can be found using IOCP implementation.
End!