本文整理汇总了C++中LPDESC::GetHandshake方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDESC::GetHandshake方法的具体用法?C++ LPDESC::GetHandshake怎么用?C++ LPDESC::GetHandshake使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDESC
的用法示例。
在下文中一共展示了LPDESC::GetHandshake方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Handshake
void CInputProcessor::Handshake(LPDESC d, const char * c_pData)
{
TPacketCGHandshake * p = (TPacketCGHandshake *) c_pData;
if (d->GetHandshake() != p->dwHandshake)
{
sys_err("Invalid Handshake on %d", d->GetSocket());
d->SetPhase(PHASE_CLOSE);
}
else
{
if (d->IsPhase(PHASE_HANDSHAKE))
{
if (d->HandshakeProcess(p->dwTime, p->lDelta, false))
{
#ifdef _IMPROVED_PACKET_ENCRYPTION_
d->SendKeyAgreement();
#else
if (g_bAuthServer)
d->SetPhase(PHASE_AUTH);
else
d->SetPhase(PHASE_LOGIN);
#endif // #ifdef _IMPROVED_PACKET_ENCRYPTION_
}
}
else
d->HandshakeProcess(p->dwTime, p->lDelta, true);
}
}
示例2: DestroyDesc
void DESC_MANAGER::DestroyDesc(LPDESC d, bool bEraseFromSet)
{
if (bEraseFromSet)
m_set_pkDesc.erase(d);
if (d->GetHandshake())
m_map_handshake.erase(d->GetHandshake());
if (d->GetHandle() != 0)
m_map_handle.erase(d->GetHandle());
else
m_set_pkClientDesc.erase((LPCLIENT_DESC) d);
// Explicit call to the virtual function Destroy()
d->Destroy();
M2_DELETE(d);
--m_iSocketsConnected;
}
示例3: Handshake
void CInputUDP::Handshake(LPDESC pDesc, const char * c_pData)
{
TPacketCGHandshake * pInfo = (TPacketCGHandshake *) c_pData;
if (pDesc->GetHandshake() == pInfo->dwHandshake)
{
sys_log(0, "UDP: Grant %s:%d", inet_ntoa(m_SockAddr.sin_addr), m_SockAddr.sin_port);
pDesc->UDPGrant(m_SockAddr);
return;
}
else
sys_log(0, "UDP: Handshake differs %s", pDesc->GetHostName());
}