corona-client-listener

AppWarp S2 Corona Client Listener

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.

function onChatReceived ( sender , message , roomid , isLobby )
  • onUpdatePeersReceieved

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

 function onUpdatePeersReceieved ( message )
  • onRoomCreated

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

 function onRoomCreated ( roomid , name , maxUsers )
  • onRoomDeleted

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

 function onRoomDeleted ( roomid , name )
  • onUserJoinedRoom

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

 function onUserJoinedRoom ( username , roomid )
  • onUserLeftRoom

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

 function onUserLeftRoom ( username , roomid )
  • onUserLeftLobby

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

 function onUserLeftLobby ( username )
  • onUserJoinedLobby

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

 function onUserJoinedLobby ( username )
  • onPrivateChatReceived

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

 function onPrivateChatReceived ( sender , message )
  • onUserChangedRoomProperty

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

 function onUserChangedRoomProperty ( username , roomid , propertyTable , lockTable )
  • onMoveCompleted

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

 function onMoveCompleted (sender, roomid , nextTurn, moveData)
  • onGameStarted

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

 function onGameStarted(sender, roomid , nextTurn)
  • onGameStopped

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

 function onGameStopped(sender, roomid)