Skip to content

C# API Reference

DhruvCShepHertz edited this page Jul 25, 2013 · 58 revisions

Before going through the below API reference, it is recommended to take a quick look at SDK model link above.

WarpClient APIs

###Initialize

    public static void Initialize(String apiKey, String privateKey)

Initializes the singleton instance of WarpClient with the developer credentials. This has to be called only once during the lifetime of the application. It is required before you can call any other API.

Parameters

apiKey - The Application key given when the application was created.
secretKey - The secret key corresponding to the application key given when the application was created.

Returns

void

###Connect

Sets up your connection with the AppWarp cloud server. The username passed in this method must be unique across all other concurrently connected users. If two users with the same name try to connect at the same time, then the last one will win and the older one will get disconnected. The result of the operation is provided in the onConnectDone callback of the ConnectionRequestListener.

    public void Connect(String username)

Parameters

username - name of the player

Returns

void

###Disconnect

Disconnects the connection with the AppWarp server. The result for this request will be provided in the onDisConnectDone callback of the ConnectionRequestListener.

    public void Disconnect()

Parameters

Returns

void

###GetConnectionState

Queries the connection state of the client with the server. The returned byte value should be interpreted as WarpConnectionState.

    public byte GetConnectionState()

Parameters

Returns

byte

###JoinLobby

Sends a join lobby request to the server. Result of the request is provided in the onJoinLobbyDone callback of the registered LobbyRequestListener objects.

    public void JoinLobby()

Parameters

Returns

void

LeaveLobby

Sends a leave lobby request to the server. Result of the request is provided in the onLeaveLobbyDone callback of the registered LobbyRequestListener objects.

    public void LeaveLobby()

Parameters

Returns

void

###SubscribeLobby

Sends a subscribe lobby request to the server. Result of the request is provided in the onSubscribeLobbyDone callback of the registered LobbyRequestListener objects. Users which have subscribed to the lobby receive chat events from other users in the lobby as well as join/leave notifications about all players to and fro the lobby and all the rooms. In addition, lobby subscribers get notifications when a new room is created or deleted. All these notification events are given in the registered NotifyListener objects.

    public void SubscribeLobby()

Parameters

Returns

void

###UnSubscribeLobby

Sends a unsubscribe lobby request to the server. Result of the request is provided in the onUnsubscribeLobbyDone callback of the LobbyRequestListener.

    public void UnsubscribeLobby()

Parameters

Returns

void

###JoinRoom

Sends a join room request to the server. Result of the request is provided in the onJoinRoomDone callback of the registered RoomRequestListener objects. A user can only be joined in one location (room or lobby) at a time. If a user joins a room, it will automatically be removed from its current location.

    public void JoinRoom(String roomId)

Parameters

roomId - Id of the room to be joined

Returns

void

###JoinRoomInRange

Sends a join room request to the server with the given range of joined users. Result of the request is provided in the onJoinRoomDone callback of the registered RoomRequestListener objects. A user can only be joined in one location (room or lobby) at a time. If a user joins a room, it will automatically be removed from its current location. This enables developers to easily add quick-play scenarios.

    public void JoinRoomInRange(int minUserCount, int maxUserCount, bool maxPreferred)

Parameters

minUserCount - minimum users in the room

maxUserCount - maximum users in the room

maxPreferred - prefer joining a room with more users

Returns

void

###GetRoomsInRange

Sends a request to the server to fetch a list of rooms with the given range of joined users. Result of the request is provided in the onGetMatchedRoomsDone callback of the registered ZoneRequestListener objects.

    public void GetRoomsInRange(int minUserCount, int maxUserCount)

Parameters

minUserCount - minimum users in the room

maxUserCount - maximum users in the room

Returns

void

###JoinRoomWithNUser

Sends a join room request to the server with the condition that the room must have at least the given number of users. Result of the request is provided in the onJoinRoomDone callback of the registered RoomRequestListener. This is deprecated and developers should use the JoinRoomInRange API instead.

    public void JoinRoomWithNUser(int userCount)

Parameters

userCount- minimum number of users in room

Returns

void

###JoinRoomWithProperties

Sends a join room request to the server with the condition that the room must have a matching set of property value pairs associated with it. This is useful in match making. Result of the request is provided in the onJoinRoomDone callback of the registered RoomRequestListener.

    public void JoinRoomWithProperties(Dictionary<String, Object> tableProperties)

Parameters

tableProperties- properties of the room to be joined

Returns

void

###LeaveRoom

Sends a leave room request to the server. Result of the request is provided in the onLeaveRoomDone callback of the registered RoomRequestListener.

    public void LeaveRoom(String roomId)

Parameters

roomId - Id of the room to be left

Returns

void

###CreateRoom

Sends a create room request to the server with the given meta data. Result of the request is provided in the onCreateRoomDone callback of the registered ZoneRequestListener objects. If successful, this will create a dynamic room at the server. These rooms lifetime is limited till the time users are inside it. Read more about Rooms here.

    public void CreateRoom(String name, String owner, int maxUsers, Dictionary<String, Object> tableProperties)

Parameters

name - name of the room
owner - owner of the room (behavior and usage of this meta property is up to the developer)
maxUsers - number of maximum users allowed in the room
tableProperties - properties of room (can be null)

Returns

void

###CreateTurnRoom

Sends a create turn based room request to the server with the given meta data. Result of the request is provided in the onCreateRoomDone callback of the registered ZoneRequestListener objects. If successful, this will create a dynamic turn based room at the server. These rooms lifetime is limited till the time users are inside it. Read more about Rooms here.

    public void CreateTurnRoom(String name, String owner, int maxUsers, Dictionary<String, Object> tableProperties, int turnTime)

Parameters

name - name of the room
owner - owner of the room (behavior and usage of this meta property is up to the developer)
maxUsers - number of maximum users allowed in the room
tableProperties - properties of room (can be null)
turnTime - the time (in seconds) allowed for a user to complete its turn and send a move.

Returns

void

###SendMove

Sends a move to the server for the joined turn based room.Result of the request is provided in the onSendMoveDone callback of the registered TurnBasedRoomListener objects. If the joined user is not a turn based room or if its not the users turn, this request will fail. If successful, this will result in onMoveCompleted notification for all the subscribed users on the registered NotifyListener objects.

    public void sendMove(String moveData)

Parameters

moveData - any meta data associated with the move

Returns

void

###DeleteRoom

Sends a delete room request to the server. Result of the request is provided in the onDeleteRoomDone callback of the registered ZoneRequestListener objects. Only dynamic rooms can be deleted through this API. Static rooms (created from AppHQ) can not be deleted through this. Read more about Rooms here.

    public void DeleteRoom(String roomId)

Parameters

roomId - Id of the room to be deleted

Returns

void

###SubscribeRoom

Sends a subscribe room request to the server. Result of the request is provided in the onSubscribeRoomDone callback of the registered RoomRequestListener objects. Once subscribed, the client will receive all notifications from the room such as chat, update and property change events. In addition the client will also receive notifications when a user joins or leaves the subscribed room. These notifications are given in the registered NotifyListener objects.

    public void SubscribeRoom(String roomId)

Parameters

roomId - Id of the room to be subscribed

Returns

###UnSubscribeRoom

Sends a unsubscribe room request to the server. Result of the request is provided in the onUnSubscribeRoomDone callback of the registered RoomRequestListener objects.

    public void UnSubscribeRoom(String roomId)

Parameters

roomId - Id of the room to be unsubscribed

Returns

void

###SendChat

Sends a chat message to the room (or lobby) in which the user is currently joined. Result of the request is provided in the onSendChatDone callback of the registered ChatRequestListener objects. All users who are subscribed to the location in which the message is sent will get a onChatReceived event on their registered NotifyListener objects.

    public void SendChat(String message)

Parameters

message - message to be send

Returns

void

###SendPrivateChat

Sends a private message to the given user if its online. Result of the request is provided in the onSendPrivateChatDone callback of the registered ChatRequestListener objects. The sender and receiver don't need to be in the same room or lobby for the private message to be delivered. This is useful in building invite/challenge friend like scenarios. If successful, the receiver will get a onPrivateChatReceived event on its registered NotifyListener objects.

    public void sendPrivateChat(String username, String message)

Parameters

username - recipient of the message

message - message to be send

Returns

void

###SendUpdatePeers

Sends a byte array update message to room in which the user is currently joined. Result of the request is provided in the onSendUpdateDone callback of the registered UpdateRequestListener objects. All users who are subscribed to the room in which the update is sent will get a onUpdatePeersReceived event on their registered NotifyListener objects. This is useful if developers want to send their own binary encoded data across and is useful in minimizing the payload exchanged between the clients and AppWarp cloud server. The frequency at which these messages can be processed is not restricted by the server. However, the latency involved is largely determined by the client's bandwidth. The corresponding UDP flavor of this API is sendUdpUpdatePeers, which is unreliable and may not work over cellular data connections - hence no result callback should be expected from it. The behavior is otherwise similar.

    public void SendUpdatePeers(byte[] update)

Parameters

update - byte array data to be sent

Returns

void

###GetLiveRoomInfo

Retrieves the live information of the given room from the server. Result is provided in the onGetLiveRoomInfoDone callback of the registered RoomRequestListener objects. The information includes the names of the currently joined users, the rooms properties and any associated customData. This is useful in getting a snapshot of a rooms state.

    public void GetLiveRoomInfo(String roomId)

Parameters

roomId - Id of the room

Returns

void

###GetLiveUserInfo

Retrieves the live information of the user from the server. Result is provided in the onGetLiveUserInfo callback of the registered ZoneRequestListener objects. The information (if user is online) includes the current location of the user and any associated custom data. It is useful in building scenarios where you want to find if a users friends are online or not and then join their room if found online.

    public void GetLiveUserInfo(String username)

Parameters

username - user who's information is requested

Returns

void

###GetLiveLobbyInfo

Retrieves live information of the lobby from the server. Result is provided in the onGetLiveLobbyInfo callback of the registered LobbyRequestListener objects. The information returned includes the names of the users who are currently joined in the lobby.

    public void GetLiveLobbyInfo()

Parameters

Returns

void

###SetCustomUserData

Updates the custom data associated with the given user on the server (if the given user is online). Result is provided in the onSetCustomUserDataDone callback of the registered ZoneRequestListener objects. It can be useful in setting status messages or avatar url's etc for online users.

    public void SetCustomUserData(String userName, String customData)

Parameters

userName - user for whom custom data has to be update
customData - custom data that will be set for the user

Returns

void

###SetCustomRoomData

Updates the custom data associated with the given room on the server. The result is provided in the onSetCustomRoomDataDone callback of the registered RoomRequestListener objects. It is recommended you use the room's properties where ever possible. Use this when you need to associate data with a room which can not be represented as key value pairs.

    public void SetCustomRoomData(String roomId, String customRoomData)

Parameters

roomId - Id of the room
customRoomData - custom data that will be set for the room

Returns

void

###UpdateRoomProperties

Updates the properties associated with the given room on the server. Result is provided in the onUpdatePropertyDone callback of the registered RoomRequestListener objects. Properties which are not found on the server, will be added while properties which are already present will simply be updated with the new values. You can also specify the list of properties that you want to remove from the remove. This request (if successful) will also result in an onUserChangeRoomProperty notification on the registered NotifyListener objects to be triggered for all subscribed users of the room.

    public void UpdateRoomProperties(String roomID, Dictionary<String, Object> tableProperties, List<String> removeList)

Parameters

roomId - Id of the room
tableProperties- Properties of the room to be added or updated.
removeList - List of properties to be removed.

Returns

void

###LockProperties

Locks the given room properties associated with the currently joined room on the server. Result is provided in the onLockPropertiesDone callback of the registered RoomRequestListener objects. If any property is currently locked by another user, this request will fail. This request (if successful) will also result in an onUserChangeRoomProperty notification on the registered NotifyListener objects to be triggered for all subscribed users of the room.

    public void LockProperties(Dictionary<String, Object> lockedProperties)

Parameters

lockedProperties - dictionary of keys and their values to be locked for the user

Returns

void

###UnlockProperties

Unlocks the given room properties associated with the currently joined room on the server. Result is provided in the onUnlockPropertiesDone callback of the registered RoomRequestListener objects. If any property is currently locked by another user, this request will fail. This request (if successful) will also result in an onUserChangeRoomProperty notification on the registered NotifyListener objects to be triggered for all subscribed users of the room.

    public void UnlockProperties(List<String> properties)

Parameters

properties - list of keys to be unlocked for the user

Returns

void

###GetOnlineUsers

Retrieves usernames of all the users connected (online) to the server. Result is provided in the onGetOnlineUsers callback of the registered ZoneRequestListener objects.

    public void GetOnlineUsers()

Parameters

Returns

void

###GetAllRooms

Retrieves the room ids of all the rooms on the server. Result is provided in the onGetAllRoomsDone callback of the registered ZoneRequestListener objects. To get a filtered list of rooms, use the GetRoomWithNUser or GetRoomWithProperties APIs.

    public void GetAllRooms()

Parameters

Returns

void

###GetRoomWithNUser

Retrieves information of the rooms that contain at least n users in them. Result is provided in the onGetMatchedRoomsDone callback of the registered ZoneRequestListener objects. This is deprecated and developers should use the GetRoomsInRange API instead.

    public void GetRoomWithNUser(int userCount)

Parameters userCount - No of user in room

Returns

void

###GetRoomWithProperties

Retrieves information of the room that contain properties which match with the given properties. Result is provided in the onGetMatchedRoomsDone callback of the registered ZoneRequestListener objects. This is useful in building a filtered list of rooms.

    public void GetRoomWithProperties(Dictionary<String, Object> properties)

Parameters properties- Properties of the room to be matched

Returns

void

###AddConnectionRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for Connect and Disconnect APIs. The object must implement the ConnectionRequestListener interface.

    public void AddConnectionRequestListener(ConnectionRequestListener listner)

Parameters

listener - listener object

Returns

void

###AddRoomRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for requests pertaining to a room. The object must implement the RoomRequestListener interface.

    public void AddRoomRequestListener(RoomRequestListener listner)

Parameters

listener - listener object

Returns

void

###AddZoneRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for zone level requests such as create/delete room or live user info requests. The object must implement the ZoneRequestListener interface.

    public void AddZoneRequestListener(ZoneRequestListener listner)

Parameters

listener - listener object

Returns

void

###AddLobbyRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for lobby level request. The object must implement the LobbyRequestListener interface.

    public void AddLobbyRequestListener(LobbyRequestListener listner)

Parameters

listener - listener object

Returns

void

###AddNotificationListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a notification is received from the server from any subscribed location (room or lobby). The object must implement the NotifyListener interface.

    public void AddNotificationListener(NotifyListener listner)

Parameters

listener - listener object

Returns

void

###AddUpdateRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for a SendUpdatePeers request. The object must implement the UpdateRequestListener interface.

    public void AddUpdateRequestListener(UpdateRequestListener listener)

Parameters

listener - listener object

Returns

void

###AddChatRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for a SendChat request. The object must implement the ChatRequestListener interface.

    public void AddChatRequestListener(ChatRequestListenerlistener listener)

Parameters

listener - listener object

Returns

void

###AddTurnBasedRoomRequestListener

Adds (registers) the given listener object to the list of objects on which callbacks will be invoked when a response from the server is received for a SendMove request. The object must implement the TurnBasedRoomListener interface.

    public void AddTurnBasedRoomRequestListener(TurnBasedRoomListener listener)

Parameters

listener - listener object

Returns

void

WarpClient Events

###AllRoomsEvent

This event is raised in response to the getAllRooms request. It is passed in the registered ZoneRequestListener's onGetAllRoomsDone request. It exposes the following properties

  • byte result - Result status of the request.
  • String[] roomIds - room id array of all the rooms.
public byte getResult();

public String[] getRoomIds();

###AllUsersEvent

This event is raised in response to the getOnlineUsers request. It is passed in the registered ZoneRequestListener's onGetOnlineUsersDone method. It exposes the following properties

  • byte result - Result status of the request.
  • String[] usernames - array of usernames for all the online users.
public byte getResult();

public String[] getUserNames();

###ChatEvent

This event is raised when a chat notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener's onChatReceived method. It exposes the following properties

  • String message - The string message sent by the sender.
  • String sender - The sender of the message.
  • String locationId - The id of the location in which the message was sent (eg: room id)
  • boolean isLocationLobby - Is the location a room or lobby.
public String getSender();

public String getMessage();

public String getLocationId();

public bool isLocationLobby();

###MoveEvent

This event is raised when a move completed notification is received from a subscribed turn based room. It is passed in registered NotifyListener's onMoveCompleted method. It exposes the following properties

  • String moveData - The associated move data.
  • String sender - The sender of the move.
  • String RoomId - The id of the room in which the move was sent
  • String nextTurn - The username of the user whose turn it is now
public String getSender();

public String getMoveData();

public String getRoomId();

public bool getNextTurn();

###ConnectEvent

This event is raised in response to a connectWithUsername request. It is passed in the registered ConnectionRequestListener's onConnectDone method. It exposes the following properties

  • byte result - Result status of the request.
public byte getResult();

###LiveRoomInfoEvent

This event is raised in response to the getLiveRoomInfo or getLiveLobbyInfo request. It is passed in the registered RoomRequestListener's onGetLiveRoomInfoDone method and in the LobbyRequestListener's onGetLiveLobbyInfoDone method. It exposes the following properties

  • String[] joinedUsers - Array of usernames who are joined in the room
  • String customData - Custom data associated with the room
  • Dictionary<String,Object> properties - Properties associated with the room (empty for lobby).
  • RoomData data - The static information structure of the room (or lobby).
  • byte result - Result status of the request.
  • Dictionary<String,String> lockTable - Locked properties table associated with the room (empty for lobby).
public RoomData getData();

public byte getResult();

public String[] getJoinedUsers();

public String getCustomData();

public Dictionary<String, Object> getProperties();

###LiveUserInfoEvent

This event is raised in response to the getLiveUserInfo request. It is passed in the registered ZoneRequestListener's onGetLiverUserInfo request method. It exposes the following properties

  • byte result - Result status of the request.
  • String locationId - The id of the location in which the user is present.
  • String name - The username of the user
  • String customData - The custom data associated with the user
  • boolean isLocationLobby - Is the users location a room or a lobby.
public byte getResult();

public bool isLocationLobby();

public String getLocationId();

public String getName();

public String getCustomData();

###LobbyData

This represents a construct for holding static lobby information. It extends the RoomData class and exposes the following properties

  • String Id - The id of the lobby. This is always 0 and is reserved for future if multi-lobby support is added.
  • String owner - The owner of the lobby.
  • int maxUsers - The max concurrent users allowed in the lobby.
  • String name - The name of the lobby.
  • boolean isPrimary - Is the lobby the primary one. This is always true and is reserved for future if multi-lobby support is added.
public String getId();

public String getRoomOwner();

public String getName();

public int getMaxUsers();

public Boolean isPrimary();

###LobbyEvent

This event is raised in response to requests for join/leave/subscribe/unsubscribe lobby. It is passed in the corresponding methods of the registered LobbyRequestListener. It exposes the following properties.

  • byte result - Result status of the request.
  • LobbyData data - The static information structure of the lobby.
public LobbyData getInfo();

public byte getResult();

###RoomData

This represents a construct for holding the room's static information. It exposes the following properties

  • String roomId - Unique id of a room. It is unique across all the rooms.
  • String owner - owner of the room (behavior and usage of this meta property is up to the developer)
  • int maxUsers - number of maximum users allowed in the room
  • String name - name of the room
public String getId();

public String getRoomOwner();

public String getName();

public int getMaxUsers();

###RoomEvent

This event is raised in response to requests for join/leave/subscribe/unsubscribe room. It is passed in the corresponding methods of the registered RoomRequestListener. It exposes the following properties.

  • RoomData data - The static information structure of the room.
  • byte result - Result status of the request.
public RoomData getData();

public byte getResult();

###UpdateEvent

This event is raised when a updatePeers notification is received from a subscribed location such as room or lobby. It is passed in registered NotifyListener's onUpdatePeersReceived method. It exposes the following properties.

  • byte[] update - The byte array sent in the room.
  • boolean isUDP - Flag to indicate whether the byte array was sent using UDP or TCP.
public byte[] getUpdate();

public bool getIsUdp();

###MatchedRoomEvent

This event is raised in response to requests for matchmaking (getRoomwithNUsers/getRoomWithProperties). It is passed in the corresponding methods of the registered ZoneRequestListener. It exposes the following properties.

  • byte[] result - Result status of the request.
  • RoomData[] roomData - Array RoomData objects representing each of the matched rooms.
public byte getResult();

public RoomData[] getRoomsData();

WarpClient Listeners

###ConnectionRequestListener

        /// Invoked when a response for Connect request is received.
        /// <param name="eventObj"></param>
        void onConnectDone(ConnectEvent eventObj);
        /// Invoked when a response for Disconnect request is received.
        /// <param name="eventObj"></param>
        void onDisconnectDone(ConnectEvent eventObj);

###RoomRequestListener

        /// Invoked when the response for subscribeRoom request is received.
        /// <param name="eventObj"></param>
        void onSubscribeRoomDone(RoomEvent eventObj);
        /// Invoked when the response for unsubscribeRoom request is received.
        /// <param name="eventObj"></param>
        void onUnSubscribeRoomDone(RoomEvent eventObj);
        /// Invoked when the response for joinRoom request is received.
        /// <param name="eventObj"></param>
        void onJoinRoomDone(RoomEvent eventObj);
        /// Invoked when the response for leaveRoom request is received.
        /// <param name="eventObj"></param>
        void onLeaveRoomDone(RoomEvent eventObj);
        /// Invoked when the response for GetLiveRoomInfo request is received.
        /// <param name="eventObj"></param>
        void onGetLiveRoomInfoDone(LiveRoomInfoEvent eventObj);
        /// Invoked when the response for setCustomRoomData request is received.
        /// <param name="eventObj"></param>
        void onSetCustomRoomDataDone(LiveRoomInfoEvent eventObj);
        /// Invoked when the response for UpdateRoomProperties request is received.
        /// <param name="eventObj"></param>
        void onUpdatePropertyDone(LiveRoomInfoEvent lifeLiveRoomInfoEvent);
	/// <summary>
	/// Invoked when the response for LockProperties request is received.
	/// </summary>
	/// <param name="result"></param>
	void onLockPropertiesDone(byte result);
	/// <summary>
	/// Invoked when the response for UnlockProperties request is received.
	/// </summary>
	/// <param name="result"></param>
	void onUnlockPropertiesDone(byte result);

###ZoneRequestListener

        /// Invoked when a response for DeleteRoom request is receieved.
        /// <param name="eventObj"></param>
        void onDeleteRoomDone(RoomEvent eventObj);
        /// Invoked when a response for GetAllRooms request is receieved.
        /// <param name="eventObj"></param>
        void onGetAllRoomsDone(AllRoomsEvent eventObj);
        /// Invoked when a response for CreateRoom request is receieved.
        /// <param name="eventObj"></param>
        void onCreateRoomDone(RoomEvent eventObj);
        /// Invoked when a response for GetOnlineUsers request is receieved.
        /// <param name="eventObj"></param>
        void onGetOnlineUsersDone(AllUsersEvent eventObj);
        /// <summary>
        /// Invoked when a response for GetLiveUserInfo request is receieved.
        /// <param name="eventObj"></param>
        void onGetLiveUserInfoDone(LiveUserInfoEvent eventObj);
        /// Invoked when a response for SetCustomUserData request is receieved.
        /// <param name="eventObj"></param>
        void onSetCustomUserDataDone(LiveUserInfoEvent eventObj);
        /// Invoked when a response from GetRoomWithNUser and GetRoomWithProperties 
        /// <param name="matchedRoomsEvent"></param>
        void onGetMatchedRoomsDone(MatchedRoomsEvent matchedRoomsEvent);

###LobbyRequestListener

        /// Invoked when the response for joinLobby request is received.
        /// <param name="eventObj"></param>
        void onJoinLobbyDone(LobbyEvent eventObj);
       /// Invoked when the response for leaveLobby request is received.
       /// <param name="eventObj"></param>
        void onLeaveLobbyDone(LobbyEvent eventObj);
       /// Invoked when the response for subscribeLobby request is received.
       /// <param name="eventObj"></param>
        void onSubscribeLobbyDone(LobbyEvent eventObj);
       /// Invoked when the response for unsubscribeLobby request is received.
       /// <param name="eventObj"></param>
        void onUnSubscribeLobbyDone(LobbyEvent eventObj);
        /// Invoked when the response for GetLiveLobbyInfo request is received.
        /// <param name="eventObj"></param>
        void onGetLiveLobbyInfoDone(LiveRoomInfoEvent eventObj);

###NotifyListener

        /// <summary>
        /// Invoked when a room is created.
        /// </summary>
        /// <param name="eventObj"></param>
        void onRoomCreated(RoomData eventObj);

        /// <summary>
        /// Invoked when a room is deleted.
        /// </summary>
        /// <param name="eventObj"></param>
        void onRoomDestroyed(RoomData eventObj);
        /// <summary>
        /// Invoked when a user leaves a room.
        /// </summary>
        /// <param name="eventObj"></param>
        /// <param name="username"></param>
        void onUserLeftRoom(RoomData eventObj, String username);
     
        /// <summary>
        /// Invoked when a user joins a room.
        /// </summary>
        /// <param name="eventObj"></param>
        /// <param name="username"></param>
        void onUserJoinedRoom(RoomData eventObj, String username);

        /// <summary>
        /// Invoked when a user leaves the lobby.
        /// </summary>
        /// <param name="eventObj"></param>
        /// <param name="username"></param>
        void onUserLeftLobby(LobbyData eventObj, String username);

        /// <summary>
        /// Invoked when a user joins the lobby.
        /// </summary>
        /// <param name="eventObj"></param>
        /// <param name="username"></param>
        void onUserJoinedLobby(LobbyData eventObj, String username);    
 
        /// <summary>
        /// Invoked when a chat message is sent in one of the subscribed rooms.
        /// </summary>
        /// <param name="eventObj"></param>
        void onChatReceived(ChatEvent eventObj);

        /// <summary>
        /// Invoked when a updatePeers request is sent in one of the subscribed rooms.
        /// </summary>
        /// <param name="eventObj"></param>
        void onUpdatePeersReceived(UpdateEvent eventObj);

	/// <summary>
	/// Invoked when a updatePeers request is sent in one of the subscribed rooms.
	/// </summary>
	/// <param name="roomData"></param>
	/// <param name="sender"></param>
	/// <param name="properties"></param>
	/// <param name="lockedPropertiesTable"></param>
	void onUserChangeRoomProperty(RoomData roomData, string sender, Dictionary<String, Object> properties, Dictionary<String, String> lockedPropertiesTable);

	/// <summary>
	/// Invoked when a private chat is received from the given sender.
	/// </summary>
	/// <param name="sender"></param>
	/// <param name="message"></param>
	void onPrivateChatReceived(String sender, String message);

	/// <summary>
	/// Invoked when a user's move is completed in a turn based room
	/// </summary>
	/// <param name="?"></param>
	void onMoveCompleted(MoveEvent moveEvent);

###UpdateRequestListener

        /// Invoked when a response for sendUpdatePeers is received. Result of the
        /// operation is passed as an argument of value WarpResponseResultCode.
        /// <param name="result"></param>
         void onSendUpdateDone(byte result);

###ChatRequestListener

        /// Invoked when a response for sendChat is received. Result of the
        /// operation is passed as an argument of value WarpResponseResultCode.
        /// <param name="result"></param>
         void onSendChatDone(byte result);  

	/// <summary>
	/// Invoked when a response for sendPrivateChat is received. Result of the
	/// operation is passed as an argument of value WarpResponseResultCode.
	/// </summary>
	/// <param name="result"></param>
	void onSendPrivateChatDone(byte result);       

###TurnBasedRoomListener

	/// <summary>
	/// Invoked when a response for a sendMove request is received.
	/// </summary>
	/// <param name="result"></param>
	void onSendMoveDone(byte result);

WarpClient Event Result Codes

        public  const byte SUCCESS = 0;
        public  const byte AUTH_ERROR = 1;
        public  const byte RESOURCE_NOT_FOUND = 2;
        public  const byte RESOURCE_MOVED = 3;
        public  const byte BAD_REQUEST = 4;
        public  const byte CONNECTION_ERR = 5;
        public  const byte UNKNOWN_ERROR = 6;
        public  const byte RESULT_SIZE_ERROR = 7;

SUCCESS

The request was successfully received and processed by the server.

AUTH_ERROR

The session id sent in the request was incorrect. This can happen if the client connects without initializing with the correct keys.

RESOURCE_NOT_FOUND

The resource for which the request was intended is not known to the server. For example a bad room id is given to a joinRoom request.

RESOURCE_MOVED

The resource for which the request was intended to has moved to a state where it can't process the request. For example, if a client sends a chat or updatePeers message and the connected user is not present in any room.

UNKNOWN_ERROR

This is an unexpected error. Retrying the request is recommended if this happens.

BAD_REQUEST

This occurs if the parameters passed to the request are invalid. For example if null or empty string is passed in the roomId parameter of a joinRoom request.

CONNECTION_ERR

This occurs if the underlying TCP connection with AppWarp cloud service got broken. The client will need to reconnect to the service and retry the operation.

WarpClient Connection States

        public const byte DISCONNECTED = 0;
        public const byte CONNECTED = 1;
        public const byte CONNECTING = 2;

DISCONNECTED

This state indicates that the client is disconnected from the server. It can happen if the client looses internet connectivity or if the application calls disconnect. In this state, the application is allowed to call connect.

CONNECTED

The state indicates that the client is connected to the appwarp server. A call to connect in this state will fail. The application must call disconnect first if it wants to (re)connect with a different name for example.

CONNECTING

This is a transient state the client is in just after calling connect and before moving to either a connected or disconnected state. A call to (re)connect in this state will fail.

You can’t perform that action at this time.