twisted-iocpsupport provides a C extension for Twisted's I/O Completion Ports (IOCP) reactor, primarily used on Windows for high-performance asynchronous I/O. It enhances the `twisted.internet.iocpreactor` module, making the IOCP reactor available for use. The current version is 25.10.1, with releases typically tied to Twisted's release cycle and Python version support, focusing on platform compatibility and binary wheels.
pip install twisted-iocpsupportVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to install and run a basic Twisted echo server using the IOCP reactor on Windows, which utilizes the `twisted-iocpsupport` extension for high-performance I/O. This example will only run the server if executed on a Windows operating system.
Only install and use `twisted-iocpsupport` on Windows platforms for its intended purpose. On other operating systems, Twisted will default to other reactors (e.g., epoll, kqueue, select).
Ensure that `from twisted.internet import iocpreactor; iocpreactor.install()` is called at the very beginning of your application's lifecycle, before any calls to `reactor.run()` or `reactor.listenTCP()`.
On Windows, ensure you have the appropriate Microsoft C++ Build Tools installed (e.g., Visual C++ 14.0 or greater). Check the `pip install` logs for specific compiler errors. Using a Python version for which pre-built wheels exist is often the easiest solution.