python-cdp
python-cdp copied to clipboard
Expose closeable event listener in twisted
Implement the function create_listener, for pycdp.twisted, so the user can cancel it.
Remove _CLOSE_SENTINEL, because you can directly use Deferred.close to achieve the same effect.
Added tests for CDPEventListener.
~There's still an isssue with the internal state. I don't know what should happen when aiter(listener) is called multiple times.~
I think we should squash all commits into a single commit for better review and merging. Rebase your branch onto main and squash all the commits.
Thanks for your work.