Skip to content

Commit

Permalink
remove AFINetClientModule.hpp(some function is not available, please …
Browse files Browse the repository at this point in the history
…wait for a while)

Former-commit-id: 938696d1c704b471a5de0a78ae2d2e5f0106da3f [formerly 3f6e2a7f654e3214d7c7ee535ff3b625a6249772] [formerly b37ba99f466463e83b0c9eb3d522f684629ae2a9 [formerly 21985accca7d1296db3f54cacc58489bd4c493d8]]
Former-commit-id: b398593e1058cbdad2120295f3ec87918d369bf9 [formerly 89ac50188394028e1d87174de5f231853c83ccc6]
Former-commit-id: 49a31f8f0ebc000c02e56a6d05c52b22a17586e3
  • Loading branch information
nickyang4github committed Sep 25, 2018
1 parent 76fd937 commit 00c847a
Show file tree
Hide file tree
Showing 16 changed files with 21 additions and 654 deletions.
495 changes: 0 additions & 495 deletions Frame/SDK/Interface/AFINetClientModule.hpp

This file was deleted.

120 changes: 0 additions & 120 deletions Frame/SDK/Interface/AFINetModule.h

This file was deleted.

1 change: 1 addition & 0 deletions Frame/Server/GameLogicPlugin/AFCGameNetServerModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "SDK/Interface/AFIGUIDModule.h"
#include "SDK/Interface/AFINetServerManagerModule.h"
#include "SDK/Interface/AFIBusModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "Server/Interface/AFISceneProcessModule.h"
#include "Server/Interface/AFIGameServerToWorldModule.h"
#include "Server/Interface/AFIGameNetServerModule.h"
Expand Down
1 change: 0 additions & 1 deletion Frame/Server/Interface/AFIGameServerToWorldModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#pragma once

#include "SDK/Interface/AFIModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"

class AFIGameServerToWorldModule : public AFIModule
{
Expand Down
3 changes: 1 addition & 2 deletions Frame/Server/Interface/AFILoginToMasterModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@
#pragma once

#include "Common/AFProtoCPP.hpp"
#include "SDK/Core/AFMap.hpp"
#include "SDK/Interface/AFIModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"

class AFILoginToMasterModule : public AFIModule
{
public:
virtual AFINetClientModule* GetClusterModule() = 0;
virtual AFMapEx<int, AFMsg::ServerInfoReport>& GetWorldMap() = 0;
};
2 changes: 0 additions & 2 deletions Frame/Server/Interface/AFIProxyServerToWorldModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@
#pragma once

#include "SDK/Interface/AFIModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"

class AFIProxyServerToWorldModule : public AFIModule
{
public:
virtual AFINetClientModule* GetClusterModule() = 0;
virtual bool VerifyConnectData(const std::string& strAccount, const std::string& strKey) = 0;
};
1 change: 0 additions & 1 deletion Frame/Server/Interface/AFIWorldToMasterModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#pragma once

#include "SDK/Interface/AFIModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"

class AFIWorldToMasterModule : public AFIModule
{
Expand Down
3 changes: 2 additions & 1 deletion Frame/Server/LoginLogicPlugin/AFCLoginNetServerModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ void AFCLoginNetServerModule::OnSelectWorldProcess(const ARK_PKG_BASE_HEAD& xHea
xData.mutable_sender()->CopyFrom(AFIMsgModule::GUIDToPB(pSession->mnClientID));
xData.set_account(pSession->mstrAccout);

m_pLoginToMasterModule->GetClusterModule()->SendSuitByPB(pSession->mstrAccout, AFMsg::EGameMsgID::EGMI_REQ_CONNECT_WORLD, xData, xHead.GetPlayerID());//here has a problem to be solve
//TODO:will fix this
//m_pLoginToMasterModule->GetClusterModule()->SendSuitByPB(pSession->mstrAccout, AFMsg::EGameMsgID::EGMI_REQ_CONNECT_WORLD, xData, xHead.GetPlayerID());//here has a problem to be solve
}

void AFCLoginNetServerModule::OnSocketClientEvent(const NetEventType eEvent, const AFGUID& xClientID, const int nServerID)
Expand Down
1 change: 1 addition & 0 deletions Frame/Server/LoginLogicPlugin/AFCLoginNetServerModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "SDK/Interface/AFILogModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFIBusModule.h"
#include "SDK/Interface/AFIPluginManager.h"
#include "SDK/Interface/AFINetServerManagerModule.h"
#include "Server/Interface/AFILoginToMasterModule.h"
#include "Server/Interface/AFILoginNetServerModule.h"
Expand Down
6 changes: 0 additions & 6 deletions Frame/Server/LoginLogicPlugin/AFCLoginToMasterModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
*/

#include "AFCLoginToMasterModule.h"
#include "Common/AFProtoCPP.hpp"

AFCLoginToMasterModule::AFCLoginToMasterModule(AFIPluginManager* p)
{
Expand Down Expand Up @@ -138,11 +137,6 @@ void AFCLoginToMasterModule::OnWorldInfoProcess(const ARK_PKG_BASE_HEAD& xHead,
ARK_LOG_INFO("WorldInfo size = {}", xMsg.server_list_size());
}

AFINetClientModule* AFCLoginToMasterModule::GetClusterModule()
{
return m_pNetClientModule;
}

AFMapEx<int, AFMsg::ServerInfoReport>& AFCLoginToMasterModule::GetWorldMap()
{
return mWorldMap;
Expand Down
6 changes: 3 additions & 3 deletions Frame/Server/LoginLogicPlugin/AFCLoginToMasterModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@

#pragma once

#include "Common/AFProtoCPP.hpp"
#include "SDK/Interface/AFILogModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFINetClientManagerModule.h"
#include "SDK/Interface/AFIBusModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFINetClientManagerModule.h"
#include "SDK/Interface/AFIPluginManager.h"
#include "Server/Interface/AFILoginNetServerModule.h"
#include "Server/Interface/AFILoginLogicModule.h"
#include "Server/Interface/AFILoginToMasterModule.h"
Expand All @@ -40,7 +42,6 @@ class AFCLoginToMasterModule : public AFILoginToMasterModule
virtual void LogReceive(const char* str) {/*log*/}
virtual void LogSend(const char* str) {/*log*/}

virtual AFINetClientModule* GetClusterModule();
virtual AFMapEx<int, AFMsg::ServerInfoReport>& GetWorldMap();

protected:
Expand All @@ -61,7 +62,6 @@ class AFCLoginToMasterModule : public AFILoginToMasterModule
AFILoginLogicModule* m_pLoginLogicModule;
AFILoginNetServerModule* m_pLoginNetServerModule;
AFILogModule* m_pLogModule;
AFINetClientModule* m_pNetClientModule;
AFINetClientManagerModule* m_pNetClientManagerModule;
AFIBusModule* m_pBusModule;
AFIMsgModule* m_pMsgModule;
Expand Down
4 changes: 2 additions & 2 deletions Frame/Server/ProxyLogicPlugin/AFCProxyNetServerModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ void AFCProxyNetServerModule::OnReqServerListProcess(const ARK_PKG_BASE_HEAD& xH
AFMapEx<int, AFConnectionData>& xServerList = pGameNetService->GetServerList();
for (auto pGameData = xServerList.First(); pGameData != nullptr; pGameData = xServerList.Next())
{
if (ConnectData::CONNECTED == pGameData->_net_state)
if (AFConnectionData::CONNECTED == pGameData->_net_state)
{
AFMsg::ServerInfo* pServerInfo = xData.add_info();

Expand Down Expand Up @@ -294,7 +294,7 @@ bool AFCProxyNetServerModule::CheckSessionState(const int64_t nGameID, const AFG
{
AFINetClientService* pWorldNetService = m_pNetClientManagerModule->GetNetClientServiceByBusID(nGameID);
ARK_SHARE_PTR<AFConnectionData> pServerData = pWorldNetService->GetServerNetInfo(nGameID);
if (pServerData != nullptr && ConnectData::CONNECTED == pServerData->_net_state)
if (pServerData != nullptr && AFConnectionData::CONNECTED == pServerData->_net_state)
{
//数据匹配
ARK_SHARE_PTR<AFSessionData> pSessionData = mmSessionData.GetElement(xClientID);
Expand Down
7 changes: 2 additions & 5 deletions Frame/Server/ProxyLogicPlugin/AFCProxyServerToWorldModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ int AFCProxyServerToWorldModule::StartClient()
pNetClientGame->AddRecvCallback(AFMsg::EGMI_GTG_BROCASTMSG, this, &AFCProxyServerToWorldModule::OnBrocastmsg);
pNetClientGame->AddRecvCallback(this, &AFCProxyServerToWorldModule::OnOtherMessage);
pNetClientGame->AddEventCallBack(this, &AFCProxyServerToWorldModule::OnSocketWSEvent);

return 0;
}

void AFCProxyServerToWorldModule::OnServerInfoProcess(const ARK_PKG_BASE_HEAD& xHead, const int nMsgID, const char* msg, const uint32_t nLen, const AFGUID& xClientID)
Expand Down Expand Up @@ -156,11 +158,6 @@ void AFCProxyServerToWorldModule::OnSelectServerResultProcess(const ARK_PKG_BASE
mxWantToConnectMap.AddElement(pConnectData->strAccount, pConnectData);
}

AFINetClientModule* AFCProxyServerToWorldModule::GetClusterModule()
{
return m_pNetClientModule;
}

bool AFCProxyServerToWorldModule::VerifyConnectData(const std::string& strAccount, const std::string& strKey)
{
ARK_SHARE_PTR<ClientConnectData> pConnectData = mxWantToConnectMap.GetElement(strAccount);
Expand Down
3 changes: 0 additions & 3 deletions Frame/Server/ProxyLogicPlugin/AFCProxyServerToWorldModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "SDK/Interface/AFIConfigModule.h"
#include "SDK/Interface/AFILogModule.h"
#include "SDK/Interface/AFIClassModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFINetClientManagerModule.h"
#include "SDK/Interface/AFIBusModule.h"
Expand All @@ -47,7 +46,6 @@ class AFCProxyServerToWorldModule : public AFIProxyServerToWorldModule
bool Init() override;
bool PostInit() override;

virtual AFINetClientModule* GetClusterModule();
virtual bool VerifyConnectData(const std::string& strAccount, const std::string& strKey);

protected:
Expand Down Expand Up @@ -82,7 +80,6 @@ class AFCProxyServerToWorldModule : public AFIProxyServerToWorldModule
AFILogModule* m_pLogModule;
AFIProxyLogicModule* m_pProxyLogicModule;
AFIProxyNetServerModule* m_pProxyServerNet_ServerModule;
AFINetClientModule* m_pNetClientModule;
AFINetClientManagerModule* m_pNetClientManagerModule;
AFIMsgModule* m_pMsgModule;
AFIBusModule* m_pBusModule;
Expand Down
16 changes: 6 additions & 10 deletions Frame/Server/WorldLogicPlugin/AFCWorldToMasterModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@
*
*/


#include "Common/AFProtoCPP.hpp"
#include "SDK/Core/AFCDataList.hpp"
#include "SDK/Interface/AFINetClientModule.hpp"
#include "SDK/Interface/AFINetServerManagerModule.h"
#include "AFCWorldToMasterModule.h"

AFCWorldToMasterModule::AFCWorldToMasterModule(AFIPluginManager* p)
Expand Down Expand Up @@ -64,11 +59,11 @@ int AFCWorldToMasterModule::StartClient()
return -1;
}

m_pNetClientModule->AddRecvCallback(AFMsg::EGMI_REQ_CONNECT_WORLD, this, &AFCWorldToMasterModule::OnSelectServerProcess);
m_pNetClientModule->AddRecvCallback(AFMsg::EGMI_REQ_KICK_CLIENT_INWORLD, this, &AFCWorldToMasterModule::OnKickClientProcess);
m_pNetClientModule->AddRecvCallback(this, &AFCWorldToMasterModule::InvalidMessage);
pNetClientWorld->AddRecvCallback(AFMsg::EGMI_REQ_CONNECT_WORLD, this, &AFCWorldToMasterModule::OnSelectServerProcess);
pNetClientWorld->AddRecvCallback(AFMsg::EGMI_REQ_KICK_CLIENT_INWORLD, this, &AFCWorldToMasterModule::OnKickClientProcess);
pNetClientWorld->AddRecvCallback(this, &AFCWorldToMasterModule::InvalidMessage);

m_pNetClientModule->AddEventCallBack(this, &AFCWorldToMasterModule::OnSocketMSEvent);
pNetClientWorld->AddEventCallBack(this, &AFCWorldToMasterModule::OnSocketMSEvent);

}

Expand Down Expand Up @@ -125,7 +120,8 @@ void AFCWorldToMasterModule::OnSelectServerProcess(const ARK_PKG_BASE_HEAD& xHea

m_pWorldNetServerModule->GetNetServer()->SendPBMsg(AFMsg::EGMI_ACK_CONNECT_WORLD, xData, xServerData->xClient, nPlayerID);

m_pNetClientModule->SendSuitByPB(xMsg.account(), AFMsg::EGMI_ACK_CONNECT_WORLD, xData, xHead.GetPlayerID());
//TODO:will fix this
//m_pNetClientModule->SendSuitByPB(xMsg.account(), AFMsg::EGMI_ACK_CONNECT_WORLD, xData, xHead.GetPlayerID());
}

}
Expand Down
6 changes: 3 additions & 3 deletions Frame/Server/WorldLogicPlugin/AFCWorldToMasterModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
#include "SDK/Interface/AFIConfigModule.h"
#include "SDK/Interface/AFILogModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFINetClientModule.hpp"
#include "SDK/Interface/AFINetClientManagerModule.h"
#include "SDK/Interface/AFIBusModule.h"
#include "SDK/Interface/AFIMsgModule.h"
#include "SDK/Interface/AFINetClientManagerModule.h"
#include "SDK/Interface/AFINetServerManagerModule.h"
#include "SDK/Interface/AFIPluginManager.h"
#include "Server/Interface/AFIWorldToMasterModule.h"
#include "Server/Interface/AFIWorldLogicModule.h"
#include "Server/Interface/AFIWorldNetServerModule.h"
Expand Down Expand Up @@ -66,7 +67,6 @@ class AFCWorldToMasterModule : public AFIWorldToMasterModule
AFILogModule* m_pLogModule;
AFIWorldLogicModule* m_pWorldLogicModule;
AFIWorldNetServerModule* m_pWorldNetServerModule;
AFINetClientModule* m_pNetClientModule;
AFINetClientManagerModule* m_pNetClientManagerModule;
AFIBusModule* m_pBusModule;
AFIMsgModule* m_pMsgModule;
Expand Down

0 comments on commit 00c847a

Please sign in to comment.