SmartFoxServer Unity/.NET API
GetRoomList Method
NamespacesSmartFoxClientAPISmartFoxClientGetRoomList()()()
Retrieve the updated list of rooms in the current zone.
Unlike the GetAllRooms()()() method, this method sends a request to the server, which then sends back the complete list of rooms with all their properties and server-side variables (Room Variables).
If the default login mechanism provided by SmartFoxServer is used, then the updated list of rooms is received right after a successful login, without the need to call this method.
Instead, if a custom login handler is implemented, the room list must be manually requested to the server using this method.
Declaration Syntax
C#Visual BasicVisual C++
public void GetRoomList()
Public Sub GetRoomList
public:
void GetRoomList()
Remarks

Sends:
SFSEvent..::.OnRoomListUpdateDelegate

Version:
SmartFoxServer Basic / Pro

Examples
The following example shows how to retrieve the room list from the server.
CopyC#
SFSEvent.onRoomListUpdate += OnRoomListUpdate;

smartFox.GetRoomList()

public void OnRoomListUpdate(Hashtable roomList)
{
    // Dump the names of the available rooms in the current zone
    foreach (Room room in roomList.Values)
        Trace.WriteLine(room.GetName())
}
See Also

Assembly: SmartFoxClient (Module: SmartFoxClient) Version: 1.2.4.0 (1.2.4.0)