Fix exception type in unsupported setter operation
Use forEach() to enumerate message records
Improve documentation comments
Break main loop if selector is closed