C# Client Events
This event is raised in response to the getAllRooms request. It is passed in the registered ZoneRequestListener’s onGetAllRoomsDone method. It exposes the following properties
- byte result – Result status of the request.
- String[] roomIds – room ids array of all the rooms.
public byte getResult(); public String[] getRoomIds();
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 of all the online users.
public byte getResult(); public String[] getUserNames();
This event is raised when a chat notification is received from a subscribed location such as a room or a lobby. It is passed in the 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();
This event is raised when a move completed notification is received from a subscribed turn based room. It is passed in the 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();
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.
- byte reasonCode – reason code associated with the request.
public byte getResult(); public byte getReasonCode();
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 properties – Properties associated with the room (empty for lobby).
- Dictionary lockedProperties- Locked properties associated with the room (empty for lobby).
public String[] getJoinedUsers(); public String getCustomData(); public Dictionary <String, Object> getProperties(); public Dictionary <String, String> getLockedProperties();
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 user’s location a room or a lobby.
- boolean ispaused- Is the user paused.
public byte getResult(); public bool isLocationLobby(); public String getLocationId(); public String getName(); public String getCustomData(); public bool isPaused();
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 Boolean isPrimary();
This event is raised in response to the requests for join/leave/subscribe/unsubscribe lobby. It is passed in the corresponding methods of the registered LobbyRequestListener objects. 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();
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();
This event is raised in response to the requests for join/leave/subscribe/unsubscribe room. It is passed in the corresponding methods of the registered RoomRequestListener objects. 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();
This event is raised when an updatePeers notification is received from a subscribed location such as a room or a lobby. It is passed in the registered NotifyListener’s onUpdatePeersReceived method. It exposes the following properties.
- byte[] update – The byte array sent in the room.
- boolean isUDPUpdate – Flag to indicate whether the byte array was sent using UDP or TCP.
public byte[] getUpdate(); public bool getIsUdp();
This event is raised in response to the request for matchmaking (getRoomWithProperties). It is passed in the corresponding methods of the registered ZoneRequestListener objects. It exposes the following properties.
- byte[] result – Result status of the request.
- RoomData[] roomData – Array of RoomData objects representing each of the matched rooms.
public byte getResult(); public RoomData[] getRoomsData();