self._ecb = ecb
if self._ecb.AvailableBytes > 0:
data = self._ecb.AvailableData
# Check if more data from client than what is in
excess = self._ecb.TotalBytes - self._ecb.AvailableBytes
if excess > 0:
extra = self._ecb.ReadClient(excess)
data = data + extra
# rewind to start
Morale of story: win32 extension docs are light, due to it being a Python wrapper around the Windows API, and you need to read the Microsoft docs to get all the info.
Now just need to find some Microsoft docs that I can understand about Windows completion ports. Then I can start work on the threaded extension.
The simple ISAPI-WSGI handler seems to be working. Need to create some unit tests to exercise it.