Home Reference Source

Variable

Static Public Summary
public

dummy: *

public

onConnect(io: Object, socket: Object): *

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
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 dummy: * source

public onConnect(io: Object, socket: Object): * source

Function for setting up a users socket connection

public onDisconnect(io: Object, socket: Object): * source

The onDisonnect function is used to clean up a users connection to a game

public sendClueMessage(io: Object, socket: Object, action: Object): * source

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:

The action emitted:
let action = {
  type: 'SOCKET_CLUE_MESSAGE',
  userid: 5,
  message: '📵🐓 🌸',
};

public sendGuessMessage(io: Object, socket: Object, action: Object): * source

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:

The action emitted:
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 sendPrompt: * source

public sendWinner(io: Object, socket: Object, user: Object): * source

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:

The action emitted:
let action = {
  type: 'SOCKET_DECLARE_WINNER',
  userid: 5,
};