Skip to content

ClientConfiguration

Greg edited this page May 6, 2015 · 15 revisions
  • messages
    • custom events to handle messages from server
  • serverEvents
    • connecting (trying to connect, will be followed by begin, resume, or error)
    • begin (the first time you connect only)
    • resume (after reconnection only)
    • disconnect (any disconnection)
    • end (cloak shut down, either due to unrecoverable error or cloak.end())
    • error (cloak error such as connection timeout. argument will have error information)
    • joinedRoom (you join a room. Argument is room name.)
    • leftRoom (you leave a room. Argument is room name.)
    • roomMemberJoined (someone joined the room you're in. Argument is an object with the user's id and name)
    • roomMemberLeft (someone left the room you're in. Argument is an object with the user's id and name)
    • lobbyMemberJoined (someone joined the lobby you're in. Argument is an object with the user's id and name)
    • lobbyMemberLeft (someone left the lobby you're in. Argument is an object with the user's id and name)
    • roomCreated (sent to lobby members if server is configured to notifyRoomChanges. Argument is the room count.)
    • roomDeleted (sent to lobby members if server is configured to notifyRoomChanges. Argument is the room count.)
  • timerEvents
  • initialData
    • Sent to server to initialize user.data. See user.data
  • socketIo
    • You can pass Socket.IO client options here.
Clone this wiki locally