corona-client-listener

*We assure you that we do not spam. You may receive occasional emails from us.
 You can always unsubscribe.
Corona

Corona Notification Listeners

Following are the notification listeners that can be registered with AppWarp instance. These are invoked if an event is received from the server for a subscribed resource.

  • onChatReceived

– Invoked when a joined user sends a chat.

 NotificationListenerTable.onChatReceived(payLoadTable['sender'], payLoadTable['chat'], payLoadTable['id'], payLoadTable['isLobby'] ~= nil)
  • onUpdatePeersReceieved

– Invoked when a updatePeers request is sent in one of the subscribed rooms.

 NotificationListenerTable.onUpdatePeersReceived(payLoad)
  • onRoomCreated

– Invoked when a room is created. Lobby subscribers will receive this.

 NotificationListenerTable.onRoomCreated(payLoadTable['id'], payLoadTable['name'], payLoadTable['maxUsers'])
  • onRoomDeleted

– Invoked when a room is deleted. Lobby subscribers will receive this.

 NotificationListenerTable.onRoomDeleted(payLoadTable['id'], payLoadTable['name'])
  • onUserJoinedRoom

– Invoked when a user joins a room. Lobby and the concerned room subscribers will receive this.

 NotificationListenerTable.onUserJoinedRoom(payLoadTable['user'], payLoadTable['id'])
  • onUserLeftRoom

– Invoked when a user leaves a room. Lobby and the concerned room subscribers will receive this.

 NotificationListenerTable.onUserLeftRoom(payLoadTable['user'], payLoadTable['id'])
  • onUserLeftLobby

– Invoked when a user leaves the lobby. Lobby subscribers will receive this.

 NotificationListenerTable.onUserLeftLobby(payLoadTable['user'])
  • onUserJoinedLobby

– Invoked when a user joins the lobby. Lobby subscribers will receive this.

 NotificationListenerTable.onUserJoinedLobby(payLoadTable['user'])
  • onPrivateChatReceived

– Invoked when a private chat is received from the given sender.

 NotificationListenerTable.onPrivateChatReceived(payLoadTable['sender'], payLoadTable['chat'])
  • onUserChangedRoomProperty

– Invoked when a user changes the properties of a subscribed room property.

 NotificationListenerTable.onUserChangedRoomProperty(payLoadTable['sender'], payLoadTable['id'], JSON:decode(payLoadTable['properties']), JSON:decode(payLoadTable['lockProperties']))
  • onMoveCompleted

– Invoked when a user completes a move in a turn based room

 NotificationListenerTable.onMoveCompleted(payLoadTable['sender'], payLoadTable['id'], payLoadTable['nextTurn'], payLoadTable['moveData'])
  • onGameStarted

– Invoked when a user completes a start game request in a turn based room

 NotificationListenerTable.onGameStarted(payLoadTable['sender'], payLoadTable['id'], payLoadTable['nextTurn'])
  • onGameStopped

– Invoked when a user completes a stop game request in a turn based room

 NotificationListenerTable.onGameStopped(payLoadTable['sender'], payLoadTable['id'])
  • onPrivateUpdateReceived

– Invoked when some private update data is received by the user.

 NotificationListenerTable.onPrivateUpdateReceived(userName,pl,reserved==2)
  • onNextTurnRequest

– Invoked when a next turn request is sent by the server.

 NotificationListenerTable.onNextTurnRequest(payLoadTable['lastTurn'])