html5-client-listener

Html5

HTML5 Client Listeners

AppWarp.Events.OnConnectDone
  
   /**
   * Invoked in response to a connect request.
   * @param event:number
   */
  onConnectDone(event);
    
AppWarp.Events.onDisconnectDone
  
  /**
   * Invoked in response to a disconnect request.
   * @param event:number
   */
  onDisconnectDone(event);  
AppWarp.Events.onSubscribeRoomDone
  
   /**
   * Invoked in response to a subscribeRoom request.
   * @param event:Room
   */
  onSubscribeRoomDone(event);  
AppWarp.Events.onUnSubscribeRoomDone
  
  /**
   * Invoked in response to a UnSubscribeRoom request.
   * @param event:Room
   */
  onUnSubscribeRoomDone(event);  
AppWarp.Events.onJoinRoomDone
  
  /**
   * Invoked in response to a joinRoom request.
   * @param event:Room
   */
  onJoinRoomDone(event);  
AppWarp.Events.onLeaveRoomDone
  
  /**
   * Invoked in response to a leaveRoom request.
   * @param event:Room
   */
  onLeaveRoomDone(event);  
AppWarp.Events.onGetLiveRoomInfoDone
  
  /**
   * Invoked in response to a getLiveRoomInfo request.
   * @param event:Room
   */
  onGetLiveRoomInfoDone(event);  
AppWarp.Events.onSetCustomRoomDataDone
  
  /**
   * Invoked in response to a setCustomRoomData request.
   * @param event:LiveRoom
   */
  onSetCustomRoomDataDone(event);  
AppWarp.Events.onUpdatePropertyDone
  
  /**
   * Invoked in response to add property to any room
   * @param event:LiveRoom
   */
  onUpdatePropertyDone(event);  
AppWarp.Events.onDeleteRoomDone
  
   /**
   * Invoked in response to a deleteRoom request.
   * @param event:Room
   */
  onDeleteRoomDone(event);
AppWarp.Events.onGetAllRoomsDone
  
  /**
   * Invoked in response to a getAllRooms request.
   * @param event:AllRoomsEvent
   */
  onGetAllRoomsDone(event);
AppWarp.Events.onCreateRoomDone
  
  /**
   * Invoked in response to a createRoom request.
   * @param event:Room
   */
  onCreateRoomDone(event);
AppWarp.Events.onGetOnlineUsersDone
  
  /**
   * Invoked in response to a getOnlineUsers request.
   * @param event:AllUsersEvent
   */
  onGetOnlineUsersDone(event);
AppWarp.Events.onGetLiveUserInfoDone
  
  /**
   * Invoked in response to a getLiveUserInfo request.
   * @param event:LiveUser
   */
  onGetLiveUserInfoDone(event);
AppWarp.Events.onSetCustomUserDataDone
  
  /**
   * Invoked in response to a setCustomRoomData request.
   * @param event:LiveUser
   */
  onSetCustomUserDataDone(event);
AppWarp.Events.onGetMatchedRoomsDone
  
   /**
   * Invoked in response to a getMatchMaking Rooms request.
   * @param event:MatchedRoomEvent
   */
  onGetMatchedRoomsDone(event);  
AppWarp.Events.onJoinLobbyDone
  
   /**
   * Invoked in response to a joinLobby request.
   * @param event:Lobby
   */
  onJoinLobbyDone(event);
AppWarp.Events.onLeaveLobbyDone
  
  /**
   * Invoked in response to a leaveLobby request.
   * @param event:Lobby
   */
  onLeaveLobbyDone(event);
AppWarp.Events.onSubscribeLobbyDone
  
  /**
   * Invoked in response to a subscribeLobby request.
   * @param event:Lobby
   */
  onSubscribeLobbyDone(event);
AppWarp.Events.onUnSubscribeLobbyDone
  
  /**
   * Invoked in response to a UnSubscribeLobby request.
   * @param event:Lobby
   */
  onUnSubscribeLobbyDone(event);
AppWarp.Events.onGetLiveLobbyInfoDone
  
  /**
   * Invoked in response to a getLiveLobbyInfo request.
   * @param event:LiveLobby
   */
  onGetLiveLobbyInfoDone( event);  
AppWarp.Events.onSendUpdateDone
  
   /**
   * Result of SendUpdatePeers request. The result value maps to a WarpResponseResultCode
   * @param result:number
   */
  onSendUpdateDone(result);  
AppWarp.Events.onSendChatDone
  
   /**
   * Result of SendChat request. The result value maps to a WarpResponseResultCode
   * @param result:number
   */
  onSendChatDone(result);
AppWarp.Events.onSendPrivateChatDone
  
  /**
   * Result of SendPrivateChat request. The result value maps to a WarpResponseResultCode
   * @param result:number
   */
  onSendPrivateChatDone(result);  
AppWarp.Events.onRoomCreated
    /**
   * Invoked when a room is created. Lobby subscribers will receive this.
   * @param event:Room
   */
  onRoomCreated(event);
AppWarp.Events.onRoomDestroyed
  /**
   * Invoked when a room is deleted. Lobby subscribers will receive this.
   * @param event:Room
   */
  onRoomDestroyed(event);
AppWarp.Events.onUserLeftRoom
  /**
   * Invoked when a user leaves a room. Lobby and the concerned room subscribers 
   * will receive this.
   * @param event:Room
   * @param username:String
   */
  onUserLeftRoom(event, username);
AppWarp.Events.onUserJoinedRoom
  /**
   * Invoked when a user joins a room. Lobby and the concerned room subscribers 
   * will receive this.
   * @param event:Room
   * @param username
   */
  onUserJoinedRoom(event, username);
AppWarp.Events.onUserLeftLobby
  /**
   * Invoked when a user leaves a lobby. Lobby subscribers will receive this.
   * @param event:Lobby
   * @param username
   */
  onUserLeftLobby(event, username);
AppWarp.Events.onUserJoinedLobby
  /**
   * Invoked when a user joins a lobby. Lobby subscribers will receive this.
   * @param event:Lobby
   * @param username
   */
  onUserJoinedLobby(event, username);    
AppWarp.Events.onChatReceived
  /**
   * Invoked when a joined user sends a chat. Rooms subscribers will receive this.
   * @param event:Chat
   */
  onChatReceived(event);
AppWarp.Events.onUpdatePeersReceived
  /**
   * Invoked when a joined user sends a updatePeers request. Rooms subscribers 
   * will receive this.
   * @param update:Uint8Array
   */
  onUpdatePeersReceived(update);
AppWarp.Events.onUserChangeRoomProperty
  /**
   * Invoked when a user change room property. Lobby and the concerned room subscribers 
   * will receive this.
   * @param username
   * @param properties
   * @param lockTable
   */
  onUserChangeRoomProperty(username,properties, lockTable);  
AppWarp.Events.onMoveCompleted
  /**
   * Invoked when a user makes a move in a turn based room
   * @param move:Move
   */
  onMoveCompleted(move);
  
AppWarp.Events.onSendMoveDone
  
   /**
   * Invoked in response to a sendMove request.
   * @param event:number
   */
  onSendMoveDone(event);
AppWarp.Events.onStartGameDone
  
   /**
   * Invoked in response to a startGame request.
   * @param event:number
   */
  onStartGameDone(event);
AppWarp.Events.onStopGameDone
  
   /**
   * Invoked in response to a stopGame request.
   * @param event:number
   */
  onStopGameDone(event);
AppWarp.Events.onGetMoveHistoryDone
  
   /**
   * Invoked in response to a onGetMoveHistoryDone request.
   * @param res:number
   * @param moves:Move[]
   */

   onGetMoveHistoryDone(res, moves);
AppWarp.Events.onGameStarted
  
   /**
   * Invoked when a game starts
   * @param sender:string
   * @param room:string
   * @param nextTurn:string
   */
  onGameStarted(sender, room, nextTurn);
AppWarp.Events.onGameStopped
  
   /**
   * Invoked when game stops.
   * @param sender:string
   * @param room:string
   */
   
   onGameStopped(sender, room);