refactor: 필요없는 코드 제거
This commit is contained in:
parent
9f5fe4ede7
commit
1a7a4b7466
2 changed files with 0 additions and 8 deletions
|
|
@ -10,7 +10,6 @@ class SessionManager {
|
||||||
public:
|
public:
|
||||||
static SessionManager &GetInstance();
|
static SessionManager &GetInstance();
|
||||||
|
|
||||||
void Join(std::shared_ptr<Session> session);
|
|
||||||
bool TryJoin(std::shared_ptr<Session> session, const std::string &nickname);
|
bool TryJoin(std::shared_ptr<Session> session, const std::string &nickname);
|
||||||
void Leave(std::shared_ptr<Session> session);
|
void Leave(std::shared_ptr<Session> session);
|
||||||
void Broadcast(PacketHeader header, std::span<const uint8_t> body);
|
void Broadcast(PacketHeader header, std::span<const uint8_t> body);
|
||||||
|
|
|
||||||
|
|
@ -6,13 +6,6 @@ SessionManager &SessionManager::GetInstance() {
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SessionManager::Join(std::shared_ptr<Session> session) {
|
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
|
||||||
sessions_.insert(session);
|
|
||||||
Logger::Log("클라이언트[", session->GetNickname(),
|
|
||||||
"]가 입장했습니다. 총 세션 수: ", sessions_.size());
|
|
||||||
}
|
|
||||||
|
|
||||||
void SessionManager::Leave(std::shared_ptr<Session> session) {
|
void SessionManager::Leave(std::shared_ptr<Session> session) {
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
if (sessions_.erase(session) > 0) {
|
if (sessions_.erase(session) > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue