Added an enum for client types And changed some code accordingly.

Only converted the server module for these changes.