Implement listen mode (ticket #25).