improving readability creating constants in socket.js