Introduction
Tutorials
How-to Guides
Reference
Explanation
API Reference
_repl_setup() stamps mode and _repl_teardown() clears it, with connect/disconnect fired.