Switch case for connection handler