本文整理汇总了C++中TBuffer::Cat方法的典型用法代码示例。如果您正苦于以下问题:C++ TBuffer::Cat方法的具体用法?C++ TBuffer::Cat怎么用?C++ TBuffer::Cat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBuffer
的用法示例。
在下文中一共展示了TBuffer::Cat方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FireReceive
EnHandleResult CTcpPullServer::FireReceive(TSocketObj* pSocketObj, const BYTE* pData, int iLength)
{
TBuffer* pBuffer = m_bfPool[pSocketObj->connID];
ASSERT(pBuffer && pBuffer->IsValid());
pBuffer->Cat(pData, iLength);
return __super::FireReceive(pSocketObj, pBuffer->Length());
}
示例2: FireReceive
EnHandleResult CTcpPullAgent::FireReceive(TSocketObj* pSocketObj, const BYTE* pData, int iLength)
{
TBuffer* pBuffer = nullptr;
GetConnectionReserved(pSocketObj, (PVOID*)&pBuffer);
ASSERT(pBuffer && pBuffer->IsValid());
pBuffer->Cat(pData, iLength);
return __super::FireReceive(pSocketObj, pBuffer->Length());
}
示例3: FireReceive
EnHandleResult CTcpPullAgent::FireReceive(TSocketObj* pSocketObj, const BYTE* pData, int iLength)
{
TBuffer* pBuffer = m_bfPool[pSocketObj->connID];
if(pBuffer != nullptr && pBuffer->IsValid())
{
int len = 0;
{
CCriSecLock locallock(pBuffer->CriSec());
if(pBuffer->IsValid())
{
pBuffer->Cat(pData, iLength);
len = pBuffer->Length();
}
}
if(len > 0) return __super::FireReceive(pSocketObj, len);
}
return HR_IGNORE;
}
示例4: FireReceive
ISocketListener::EnHandleResult CTcpPullServer::FireReceive(CONNID dwConnID, const BYTE* pData, int iLength)
{
TBuffer* pBuffer = m_bfPool[dwConnID];
if(pBuffer != nullptr && pBuffer->IsValid())
{
int len = 0;
{
CCriSecLock locallock(pBuffer->CriSec());
if(pBuffer->IsValid())
{
pBuffer->Cat(pData, iLength);
len = pBuffer->Length();
}
}
if(len > 0) return __super::FireReceive(dwConnID, len);
}
return ISocketListener::HR_IGNORE;
}