xnet: Provide way to convert xnet.Listener <-> net.Listener
Similarly to what we do in package xio (see 7ad867a3 "xio: Add Reader/Writer/... interfaces - io analogs that add support for contexts"), add utilities to bind xnet.Listener to context (giving net.Listener), and, on the other hand, adapt uncontextified net.Listener to xnet.Listener that handles cancellation. This utilities are needed because a lot of third-party code wants to work with net.Listener interface only. Contrary to xio, we can make it working reliably in both ways (because Accept already buffers accepting connections starting at OS level).
Showing
-
mentioned in commit neo@e5729209
-
mentioned in commit neo@0f7357ec
Please register or sign in to comment