Digging a little, it seems Go net poller uses edge triggered epoll on Linux. One of the harder considerations about using edge-triggered epoll is you have to read()/write() until EGAIN, otherwise you will not receive another read/write event for the socket when you call epoll_wait.
My question is, how does this work if you use the new(ish) RawConn interface? It's not stated that there are any requirements to read/write until EGAIN, just that it's expected that the programmer calls read/write (presumably through syscall.Read/Write.) What happens if you return e.g. done=true without calling read/write at all? This may be useful if you just want to wait until data is available for reading without tying up a buffer in a read call, e.g. if you have a long-lived but idle connection like a websocket, or you're waiting for follow-up requests on an http keep-alive connection, or http2 connection as in grpc. I went through the poller code, but did not manage to figure out the answer. -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/6efc1e3c-f8cf-45da-8c07-1d6201fc3a17%40googlegroups.com.