By backpressure, I mean that the proxy will choose not to read from socket A or listen for the EV_READ event, eventually the server on the other side of socket A will see that proxy is refusing the read bytes and it will signal the application to stop sending them.

To give a fuller example, imagine a client A is sending a 200 MB file to our TCP proxy, which proxies it to server B. The connection from A to the proxy is very fast (1 Gbps). The connection from the proxy to B is slow -- a 56 K modem. Server A has a 1 minute timeout, after which it will close() the connection.

Because the connection to B is so slow, the proxy will constantly be asking epoll for the EV_WRITE event on socket B. When this happens, it won't read from socket A. Therefore, it often will not be listening for the EV_READ event.

Ideally, we'd be able to get an EV_EOF event as soon as A reaches its timeout, even if we're not currently interested in write events.