# Sockets Considering how f*cken cool websockets and socketio is for realtime, I'm gonna use it. However, if I'm going to use it, some conventions, rules, tips, and definitions are needed. ### Conventions - **Chat** - Room name format - {server name}/{channel name} - Ex - main/general - Presences (who is connected, and where) - Sent to - Admin pages - Users in the same channel - Online when - Socket is connected - **Admin** - Room name format - {purpose/data} - Ex - online_users - Presences - None - **DM** - Room name format - {user id (lower)}-{user id (higher))} - Ex - 1-2 - Presences - not used - **Group DM** - **NIY** (Not Implemented Yet) ### Definitions - **Namespaces** - Chat - Used for the main chatting and yapping. Follows the server/channel format, and handles all events for clients speaking in public and private servers - Admin - Used to collect necessary performance data, and up-to-date reports for bugs and others - DM - Used to handle messages traveling between two users. - **Events** - Chat - 'login' - - move - logout - typing