Refactor Server class: move createRooms call outside constructor and update access modifier for _socket
This commit is contained in:
3
server.h
3
server.h
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user