| 1989 | |
| 1990 | |
| 1991 | void cProtocol172::SendData(const char * a_Data, size_t a_Size) |
| 1992 | { |
| 1993 | if (m_IsEncrypted) |
| 1994 | { |
| 1995 | Byte Encrypted[8192]; // Larger buffer, we may be sending lots of data (chunks) |
| 1996 | while (a_Size > 0) |
| 1997 | { |
| 1998 | size_t NumBytes = (a_Size > sizeof(Encrypted)) ? sizeof(Encrypted) : a_Size; |
| 1999 | m_Encryptor.ProcessData(Encrypted, (Byte *)a_Data, NumBytes); |
| 2000 | m_Client->SendData((const char *)Encrypted, NumBytes); |
| 2001 | a_Size -= NumBytes; |
| 2002 | a_Data += NumBytes; |
| 2003 | } |
| 2004 | } |
| 2005 | else |
| 2006 | { |
| 2007 | m_Client->SendData(a_Data, a_Size); |
| 2008 | } |
| 2009 | } |
| 2010 | |
| 2011 | |
| 2012 |
no test coverage detected