예제 #1
0
//-------------------------------------------------------------------------------------
InterfacesHandler_Interfaces::~InterfacesHandler_Interfaces()
{
	Network::Channel* pInterfacesChannel = Dbmgr::getSingleton().networkInterface().findChannel(g_kbeSrvConfig.interfacesAddr());
	if(pInterfacesChannel)
	{
		pInterfacesChannel->condemn();
	}

	pInterfacesChannel = NULL;
}
예제 #2
0
//-------------------------------------------------------------------------------------
void Proxy::kick()
{
	// 如果被销毁频道仍然存活则将其关闭
	Network::Channel* pChannel = Baseapp::getSingleton().networkInterface().findChannel(addr_);
	if(pChannel && !pChannel->isDestroyed())
	{
		Network::Bundle* pBundle = Network::Bundle::createPoolObject();
		(*pBundle).newMessage(ClientInterface::onKicked);
		ClientInterface::onKickedArgs1::staticAddToBundle(*pBundle, SERVER_ERR_PROXY_DESTROYED);
		//pBundle->send(Baseapp::getSingleton().networkInterface(), pChannel);
		this->sendToClient(ClientInterface::onKicked, pBundle);
		this->sendToClient();
		pChannel->condemn();
	}
}
예제 #3
0
//-------------------------------------------------------------------------------------
Proxy::~Proxy()
{
	Baseapp::getSingleton().decProxicesCount();

	// 如果被销毁频道仍然存活则将其关闭
	Network::Channel* pChannel = Baseapp::getSingleton().networkInterface().findChannel(addr_);
	if(pChannel && !pChannel->isDestroyed())
	{
		Network::Bundle* pBundle = Network::Bundle::ObjPool().createObject();
		(*pBundle).newMessage(ClientInterface::onKicked);
		ClientInterface::onKickedArgs1::staticAddToBundle(*pBundle, SERVER_ERR_PROXY_DESTROYED);
		//pBundle->send(Baseapp::getSingleton().networkInterface(), pChannel);
		this->sendToClient(ClientInterface::onKicked, pBundle);
		this->sendToClient();
		pChannel->condemn();
	}

	SAFE_RELEASE(pProxyForwarder_);
}