I'm writing a TCP/IP server using the Twisted framework. I am sending a very large stream of data, in small chunks. So I need to know when the data I've sent has made it through Twisted's buffers and into the OS, and the OS is ready for some more data. Is there a way to be notified when this happens?
I am doing this to measure network throughput, so I'm generating an unlimited amount of data.
If I was using normal sockets (not Twisted), the answer would be to use poll() with POLLOUT for that, but I want to do this using Twisted.