|
@@ -777,7 +777,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
// 不足包头;
|
|
|
if (PAK_LEN > pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:不足包头;\n");
|
|
|
+ //OutputDebugString("A:不足包头;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
|
else
|
|
@@ -787,19 +787,19 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
// 完整的包;
|
|
|
if (phead->len == pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:完整的包;\n");
|
|
|
+ //OutputDebugString("A:完整的包;\n");
|
|
|
_TaskProcess(pIoContext, (ProPackage*)pIoContext->m_wsaBuf.buf);
|
|
|
}
|
|
|
// 小包;
|
|
|
else if (phead->len > pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:小包;\n");
|
|
|
+ //OutputDebugString("A:小包;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
|
// 超包;
|
|
|
else if (phead->len < pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:超包;\n");
|
|
|
+ //OutputDebugString("A:超包;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + phead->len, pIoContext->m_Overlapped.InternalHigh - phead->len);
|
|
|
_TaskProcess(pIoContext, (ProPackage*)pIoContext->m_wsaBuf.buf);
|
|
|
}
|
|
@@ -815,7 +815,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
{
|
|
|
if ( phead->len <= pSocketContext->lastData.size() )
|
|
|
{
|
|
|
- OutputDebugString("C:超包;\n");
|
|
|
+ //OutputDebugString("C:超包;\n");
|
|
|
// 完整包;
|
|
|
_TaskProcess(pIoContext, (ProPackage*)pSocketContext->lastData.substr(0, phead->len).data());
|
|
|
|
|
@@ -824,7 +824,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- OutputDebugString("D:超包;\n");
|
|
|
+ //OutputDebugString("D:超包;\n");
|
|
|
lastlen = pSocketContext->lastData.size() + pIoContext->m_Overlapped.InternalHigh - phead->len;
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh - lastlen);
|
|
|
// 完整包;
|
|
@@ -837,7 +837,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- OutputDebugString("C:仍不足一个包;\n");
|
|
|
+ //OutputDebugString("C:仍不足一个包;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
|
}
|
|
@@ -848,7 +848,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
// 仍不足一个包头;
|
|
|
if ( diflen > pIoContext->m_Overlapped.InternalHigh )
|
|
|
{
|
|
|
- OutputDebugString("B:仍不足一个包头;\n");
|
|
|
+ //OutputDebugString("B:仍不足一个包头;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
|
else
|
|
@@ -860,7 +860,7 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
// 完整包;
|
|
|
if ( phead->len == PAK_LEN + pIoContext->m_Overlapped.InternalHigh - diflen )
|
|
|
{
|
|
|
- OutputDebugString("B:完整包;\n");
|
|
|
+ //OutputDebugString("B:完整包;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + diflen, pIoContext->m_Overlapped.InternalHigh - diflen);
|
|
|
_TaskProcess(pIoContext, (ProPackage*)pSocketContext->lastData.data());
|
|
|
pSocketContext->lastData.clear();
|
|
@@ -868,13 +868,13 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
|
|
|
// 小包;
|
|
|
else if ( phead->len > PAK_LEN + pIoContext->m_Overlapped.InternalHigh - diflen)
|
|
|
{
|
|
|
- OutputDebugString("B:小包;\n");
|
|
|
+ //OutputDebugString("B:小包;\n");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + diflen, pIoContext->m_Overlapped.InternalHigh - diflen);
|
|
|
}
|
|
|
// 超包;
|
|
|
else if (phead->len < PAK_LEN + pIoContext->m_Overlapped.InternalHigh - diflen)
|
|
|
{
|
|
|
- OutputDebugString("B:超包;\n");
|
|
|
+ //OutputDebugString("B:超包;\n");
|
|
|
// 组完成包;
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + diflen, phead->len - PAK_LEN);
|
|
|
_TaskProcess(pIoContext, (ProPackage*)pSocketContext->lastData.data());
|