Variable
Static Public Summary | ||
public |
dummy: * |
|
public |
Function for setting up a users socket connection |
|
public |
onDisconnect(io: Object, socket: Object): * The onDisonnect function is used to clean up a users connection to a game |
|
public |
sendClueMessage(io: Object, socket: Object, action: Object): * This function sends a clue message to all the members of a room through sockets. |
|
public |
sendGuessMessage(io: Object, socket: Object, action: Object): * This function sends a guess message to all the members of a room through sockets. |
|
public |
sendPlayerJoinGame(io: Object, socket: Object, user: Object): * This function sends a message letting the users of a game know that another user has joined. |
|
public |
sendPrompt: * |
|
public |
sendWinner(io: Object, socket: Object, user: Object): * This function sends a clue message to all the members of a room through sockets. |
Static Public
public onConnect(io: Object, socket: Object): * source
import onConnect from './smileguess-server/sockets/onConnect.js'
Function for setting up a users socket connection
public onDisconnect(io: Object, socket: Object): * source
import onDisconnect from './smileguess-server/sockets/onDisconnect.js'
The onDisonnect function is used to clean up a users connection to a game
public sendClueMessage(io: Object, socket: Object, action: Object): * source
import sendClueMessage from './smileguess-server/sockets/sendClueMessage.js'
This function sends a clue message to all the members of a room through sockets. When this action is received on the client, it will be dispatched by redux automatically.
Example:
let action = {
type: 'SOCKET_CLUE_MESSAGE',
userid: 5,
message: '📵🐓 🌸',
};
public sendGuessMessage(io: Object, socket: Object, action: Object): * source
import sendGuessMessage from './smileguess-server/sockets/sendGuessMessage.js'
This function sends a guess message to all the members of a room through sockets. When this action is received on the client, it will be dispatched by redux automatically.
Example:
let action = {
type: 'SOCKET_GUESS_MESSAGE',
userid: 5,
message: 'this will blow your mind!',
};
public sendPlayerJoinGame(io: Object, socket: Object, user: Object): * source
import sendPlayerJoinGame from './smileguess-server/sockets/sendPlayerJoinGame.js'
This function sends a message letting the users of a game know that another user has joined.
public sendWinner(io: Object, socket: Object, user: Object): * source
import sendWinner from './smileguess-server/sockets/sendWinner.js'
This function sends a clue message to all the members of a room through sockets. When this action is received on the client, it will be dispatched by redux automatically.
Example:
let action = {
type: 'SOCKET_DECLARE_WINNER',
userid: 5,
};