C-chat
Public Attributes | List of all members
Room Struct Reference

Public Attributes

char name [ROOM_NAME_MAX_LENGTH+1]
 
char description [ROOM_DESC_MAX_LENGTH+1]
 
Clientclients [MAX_USERS_PER_ROOM]
 
Clientowner
 
ReadWriteLock lock
 

Member Data Documentation

◆ clients

Client* Room::clients[MAX_USERS_PER_ROOM]

An array of pointers to clients who joined the room.

It can be written by any client thread at any time if a client joins the room or leaves the room. It can be read by any client at any time to relay a packet.

We MUST acquire lock field to access this field.


The documentation for this struct was generated from the following file: