Duplicate code client Selector removal

Removed code duplication in the client IO Handler by reusing functionality from the server.