Refactored enum using in a switch in socket server controller