refactor main class -  add _perform_request and decode message if necessary
verify if client is connected