added request server list message

This commit is contained in:
Volker Fischer 2011-04-03 17:36:45 +00:00
parent d2a80ed1b2
commit ae660bb459
2 changed files with 25 additions and 1 deletions

View file

@ -201,6 +201,12 @@ CONNECTION LESS MESSAGES
of the PROTMESSID_CLM_REGISTER_SERVER message is used of the PROTMESSID_CLM_REGISTER_SERVER message is used
- PROTMESSID_CLM_REQ_SERVER_LIST: Request server list
note: does not have any data -> n = 0
****************************************************************************** ******************************************************************************
* *
* This program is free software; you can redistribute it and/or modify it under * This program is free software; you can redistribute it and/or modify it under
@ -560,7 +566,7 @@ bool CProtocol::ParseConnectionLessMessage ( const CVector<uint8_t>& vecbyData,
break; break;
case PROTMESSID_CLM_REQ_SERVER_LIST: case PROTMESSID_CLM_REQ_SERVER_LIST:
// TODO bRet = EvaluateCLReqServerListMes ( InetAddr );
break; break;
case PROTMESSID_CLM_SEND_EMPTY_MESSAGE: case PROTMESSID_CLM_SEND_EMPTY_MESSAGE:
@ -1410,6 +1416,21 @@ bool CProtocol::EvaluateCLServerListMes ( const CHostAddress& InetAddr,
return false; // no error return false; // no error
} }
void CProtocol::CreateCLReqServerListMes ( const CHostAddress& InetAddr )
{
CreateAndImmSendConLessMessage ( PROTMESSID_CLM_REQ_SERVER_LIST,
CVector<uint8_t> ( 0 ),
InetAddr );
}
bool CProtocol::EvaluateCLReqServerListMes ( const CHostAddress& InetAddr )
{
// invoke message action
emit CLReqServerList ( InetAddr );
return false; // no error
}
/******************************************************************************\ /******************************************************************************\
* Message generation and parsing * * Message generation and parsing *

View file

@ -101,6 +101,7 @@ public:
const CServerCoreInfo& ServerInfo ); const CServerCoreInfo& ServerInfo );
void CreateCLServerListMes ( const CHostAddress& InetAddr, void CreateCLServerListMes ( const CHostAddress& InetAddr,
const CVector<CServerInfo> vecServerInfo ); const CVector<CServerInfo> vecServerInfo );
void CreateCLReqServerListMes ( const CHostAddress& InetAddr );
void CreateAndImmSendDisconnectionMes(); void CreateAndImmSendDisconnectionMes();
void CreateAndImmSendAcknMess ( const int& iID, void CreateAndImmSendAcknMess ( const int& iID,
@ -205,6 +206,7 @@ protected:
const CVector<uint8_t>& vecData ); const CVector<uint8_t>& vecData );
bool EvaluateCLServerListMes ( const CHostAddress& InetAddr, bool EvaluateCLServerListMes ( const CHostAddress& InetAddr,
const CVector<uint8_t>& vecData ); const CVector<uint8_t>& vecData );
bool EvaluateCLReqServerListMes ( const CHostAddress& InetAddr );
int iOldRecID; int iOldRecID;
int iOldRecCnt; int iOldRecCnt;
@ -246,6 +248,7 @@ signals:
CServerCoreInfo ServerInfo ); CServerCoreInfo ServerInfo );
void CLServerListReceived ( CHostAddress InetAddr, void CLServerListReceived ( CHostAddress InetAddr,
CVector<CServerInfo> vecServerInfo ); CVector<CServerInfo> vecServerInfo );
void CLReqServerList ( CHostAddress InetAddr );
}; };
#endif /* !defined ( PROTOCOL_H__3B123453_4344_BB2392354455IUHF1912__INCLUDED_ ) */ #endif /* !defined ( PROTOCOL_H__3B123453_4344_BB2392354455IUHF1912__INCLUDED_ ) */