|
@@ -728,7 +728,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
// 不足包头;
|
|
|
if (PAK_LEN > pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:不足包头;\n");
|
|
|
+ //OutputDebugString("A:不足包头;\n");
|
|
|
//GLOBAL::WriteTextLog("A:不足包头");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
@@ -738,7 +738,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
phead = (SATPROTO::DataHeader*)pIoContext->m_wsaBuf.buf;
|
|
|
if ( !CheckDataHeader(phead) )
|
|
|
{
|
|
|
- OutputDebugString("A:包头损坏;\n");
|
|
|
+ //OutputDebugString("A:包头损坏;\n");
|
|
|
//GLOBAL::WriteTextLog("A:包头损坏");
|
|
|
return;
|
|
|
}
|
|
@@ -746,21 +746,21 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
// 完整的包;
|
|
|
if (phead->len == pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:完整的包;\n");
|
|
|
+ //OutputDebugString("A:完整的包;\n");
|
|
|
//GLOBAL::WriteTextLog("A:完整的包");
|
|
|
_TaskProcess(pIoContext, (SATPROTO::Package*)pIoContext->m_wsaBuf.buf);
|
|
|
}
|
|
|
// 小包;
|
|
|
else if (phead->len > pIoContext->m_Overlapped.InternalHigh)
|
|
|
{
|
|
|
- OutputDebugString("A:小包;\n");
|
|
|
+ //OutputDebugString("A:小包;\n");
|
|
|
//GLOBAL::WriteTextLog("A:小包");
|
|
|
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");
|
|
|
//GLOBAL::WriteTextLog("A:超包");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + phead->len, pIoContext->m_Overlapped.InternalHigh - phead->len);
|
|
|
_TaskProcess(pIoContext, (SATPROTO::Package*)pIoContext->m_wsaBuf.buf);
|
|
@@ -785,7 +785,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
{
|
|
|
if ( phead->len <= pSocketContext->lastData.size() )
|
|
|
{
|
|
|
- OutputDebugString("C:超包;\n");
|
|
|
+ //OutputDebugString("C:超包;\n");
|
|
|
//GLOBAL::WriteTextLog("C:超包");
|
|
|
// 完整包;
|
|
|
_TaskProcess(pIoContext, (SATPROTO::Package*)pSocketContext->lastData.substr(0, phead->len).data());
|
|
@@ -795,7 +795,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- OutputDebugString("D:超包;\n");
|
|
|
+ //OutputDebugString("D:超包;\n");
|
|
|
//GLOBAL::WriteTextLog("D:超包");
|
|
|
lastlen = pSocketContext->lastData.size() + pIoContext->m_Overlapped.InternalHigh - phead->len;
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh - lastlen);
|
|
@@ -809,7 +809,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- OutputDebugString("C:仍不足一个包;\n");
|
|
|
+ //OutputDebugString("C:仍不足一个包;\n");
|
|
|
//GLOBAL::WriteTextLog("C:仍不足一个包");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
@@ -821,7 +821,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
// 仍不足一个包头;
|
|
|
if ( diflen > pIoContext->m_Overlapped.InternalHigh )
|
|
|
{
|
|
|
- OutputDebugString("B:仍不足一个包头;\n");
|
|
|
+ //OutputDebugString("B:仍不足一个包头;\n");
|
|
|
//GLOBAL::WriteTextLog("B:仍不足一个包头");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
|
|
|
}
|
|
@@ -832,7 +832,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
phead = (SATPROTO::DataHeader*)pSocketContext->lastData.data();
|
|
|
if ( !CheckDataHeader(phead) )
|
|
|
{
|
|
|
- OutputDebugString("B:包头损坏;\n");
|
|
|
+ //OutputDebugString("B:包头损坏;\n");
|
|
|
//GLOBAL::WriteTextLog("B:包头损坏");
|
|
|
pSocketContext->lastData.clear();
|
|
|
return;
|
|
@@ -841,7 +841,7 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
// 完整包;
|
|
|
if ( phead->len == PAK_LEN + pIoContext->m_Overlapped.InternalHigh - diflen )
|
|
|
{
|
|
|
- OutputDebugString("B:完整包;\n");
|
|
|
+ //OutputDebugString("B:完整包;\n");
|
|
|
//GLOBAL::WriteTextLog("B:完整包");
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + diflen, pIoContext->m_Overlapped.InternalHigh - diflen);
|
|
|
_TaskProcess(pIoContext, (SATPROTO::Package*)pSocketContext->lastData.data());
|
|
@@ -850,14 +850,14 @@ void CSATTCPServer::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONT
|
|
|
// 小包;
|
|
|
else if ( phead->len > PAK_LEN + pIoContext->m_Overlapped.InternalHigh - diflen)
|
|
|
{
|
|
|
- OutputDebugString("B:小包;\n");
|
|
|
+ //OutputDebugString("B:小包;\n");
|
|
|
//GLOBAL::WriteTextLog("B:小包");
|
|
|
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");
|
|
|
//GLOBAL::WriteTextLog("B:超包");
|
|
|
// 组完成包;
|
|
|
pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + diflen, phead->len - PAK_LEN);
|