Refactor socket constant names.