강의

멘토링

로드맵

Inflearn Community Q&A

ghkddnjstlr1118745's profile image
ghkddnjstlr1118745

asked

[MMORPG Game Development with C++ and Unreal Series] Part 4: Game Server

Server Service

_maxSessionCount 질문있습니다

Written on

·

212

0

const int32 acceptCount = _service->GetMaxSessionCount();

for (int32 i = 0; i < acceptCount; i++)

{

AcceptEvent* acceptEvent = xnew<AcceptEvent>();

acceptEvent->owner = shared_from_this();

_acceptEvents.push_back(acceptEvent);

RegisterAccept(acceptEvent);

}

제가 코드를 제데로 이해했는지 몰라서 질문드립니다

_maxSessionCount가 session의 최대개수를 의미하는 것은 아닌게 맞나요? 저는 _maxSessionCount 가AcceptEvent객체의 개수가 되니까 accept가 병렬적으로 처리될 수 있는 최대 개수로 이해를 했습니다

windows-serverMMORPGnetwork

Answer 1

0

Rookiss님의 프로필 이미지
Rookiss
Instructor

_maxSessionCount는 session 최대 개수가 맞긴 한데
그 수치에 비례해서 (ex. 50%라거나) acceptEvent를 걸어주는 경우가 많습니다.
acceptEvent를 딱 1개만 만들어준다거나 하면,
서버 오픈하자마자 사람들이 막 몰릴 때 많은 사람들이 접속을 못하고 튕기게 되겠죠.

ghkddnjstlr1118745's profile image
ghkddnjstlr1118745

asked

Ask a question