Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
net: add tryRead() method to Conn #29947
On my last project i were very discouraged by the feature of test connection for the data is present is absent from language. We needed high perfomance, around 1-2 millions of connections, but we have to look for the third party libraries for epoll/kqueue integration in order to get the way to read and do something with data only when it's arrived, not waiting, such decision was made because even waiting goroutines in this case take around 4-8 GB of wasted memory.
P.S add such thing for tls.conn to.
Or perhaps a special case of make(chan) which takes io.Reader objects and provides the next readable member via
referenced this issue
Jan 26, 2019
And how do i add net.Conn's to such channel?