-
connect
- Recieved when user gets connected
-
room joined
- Recieved when user joins a room
- Returns roomcode
-
hello
- Recieved when server pings (or says hello)
-
new join
- Recieved when someone joins the room
- Returns name of the new joinee
-
user left
- Recieved when someone leaves the room
- Returns name of user who left
-
user removed
- Recieved when the room creator kicks someone
- Returns name of the user who was kicked
-
send message
- Recieved when someone in your room sends the message
- Returns the message
-
quiz started
- Recieved when the room creator starts the quiz
- Returns quiz data
-
display question
- Recieved when the question has to be displayed
- Returns question data
-
answer response
- Recieved when server tells if the sent answer is correct or not
- Returns the answer data
-
answer question
- Emitted when user clicks on the option
- Sends optionId, socketId, roomCode, userId, and questionId
- Can be sent by normal user as well as creator
-
connection
- Recieved when connected to socket
-
disconnect
- Recieved when disconnected from socket
- Returns the reason
-
room joined
- Emitted when user creates a room
- Returns the code
-
room deleted
- Emitted when room gets deleted
- Can only be done by room creator
- Returns roomName
-
user removed
- Emitted when user is removed
- Can only be done by room creator
- Returns user's name
-
new join
- Emitted when a new user joins the room
- Returns user's name
-
user left
- Emitted when a user leaves the room
- Returns user's name
-
answer question
- Received when a user chooses an answer
- Gets the data related to user's socket, room, question, and option
-
answer response
- Emitted when server gives the answer's detail
- Tells whether the option user chose was correct or wrong
- Returns the answer data