Refactor Server class: move createRooms call outside constructor and update access modifier for _socket

This commit is contained in:
Torsten Schulz (local)
2025-08-11 11:45:09 +02:00
parent f44d780537
commit 89956bd01a
3 changed files with 4 additions and 2 deletions

View File

@@ -19,12 +19,13 @@ namespace Yc {
Json::Value jsonRoomList();
bool roomAllowed(std::string roomName, std::string userName, std::string password);
bool changeRoom(std::shared_ptr<User> user, std::string newRoom, std::string password);
private:
public:
int _socket;
std::shared_ptr<Yc::Lib::Config> _config;
bool _stop;
std::vector<std::shared_ptr<Yc::Lib::Room>> _rooms;
void createRooms(Json::Value roomList);
private:
void handleRequest();
void inputSwitcher(int userSocket, std::string input);
bool userExists(std::string userName);