Factored out common manager code and SocketOptions
Failed commands in SelectionHandler are now notified in a nicer way.