Spaces:
Sleeping
Sleeping
File size: 1,185 Bytes
72ec733 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | # 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
|