本文整理汇总了C++中network::Channel::condemn方法的典型用法代码示例。如果您正苦于以下问题:C++ Channel::condemn方法的具体用法?C++ Channel::condemn怎么用?C++ Channel::condemn使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类network::Channel
的用法示例。
在下文中一共展示了Channel::condemn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
//-------------------------------------------------------------------------------------
InterfacesHandler_Interfaces::~InterfacesHandler_Interfaces()
{
Network::Channel* pInterfacesChannel = Dbmgr::getSingleton().networkInterface().findChannel(g_kbeSrvConfig.interfacesAddr());
if(pInterfacesChannel)
{
pInterfacesChannel->condemn();
}
pInterfacesChannel = NULL;
}
示例2: kick
//-------------------------------------------------------------------------------------
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:
//-------------------------------------------------------------------------------------
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_);
}