scbc.sat2 5 роки тому
батько
коміт
02303d9c34
1 змінених файлів з 9 додано та 4 видалено
  1. 9 4
      VideoCapture/VideoCapture/IOCPModel.cpp

+ 9 - 4
VideoCapture/VideoCapture/IOCPModel.cpp

@@ -815,6 +815,15 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
 				if ( phead->len <= pSocketContext->lastData.size() )
 				{
 					OutputDebugString("C:낚관;\n");
+					// 供憐관;
+					_DeviceProc(pIoContext, (Package*)pSocketContext->lastData.substr(0, phead->len).data());
+
+					pSocketContext->lastData = pSocketContext->lastData.substr(phead->len);
+					pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf, pIoContext->m_Overlapped.InternalHigh);
+				}
+				else
+				{
+					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);
 					// 供憐관;
@@ -824,10 +833,6 @@ void CIOCPModel::_RecvProcess(PER_SOCKET_CONTEXT* pSocketContext, PER_IO_CONTEXT
 					if (lastlen)
 						pSocketContext->lastData.append(pIoContext->m_wsaBuf.buf + pIoContext->m_Overlapped.InternalHigh - lastlen, lastlen);
 				}
-				else
-				{
-
-				}
 			}
 			else
 			{