Lines Matching defs:nBufLen
184 int CEncryptedStreamSocket::Write(const void* lpBuf, uint32_t nBufLen)
194 int nRes = SendNegotiatingData(lpBuf, nBufLen, nBufLen);
197 return nBufLen; // report a full send, even if we didn't for some reason - the data is now in our buffer and will be handled later
209 //printf("Writing %i bytes of data\n", nBufLen);
210 CSocketClientProxy::Write(lpBuf, nBufLen);
214 int CEncryptedStreamSocket::Read(void* lpBuf, uint32_t nBufLen)
216 CSocketClientProxy::Read(lpBuf, nBufLen);
218 m_bFullReceive = m_nObfusicationBytesReceived == (uint32)nBufLen;
684 int CEncryptedStreamSocket::SendNegotiatingData(const void* lpBuf, uint32_t nBufLen, uint32_t nStartCryptFromByte, bool bDelaySend)
687 wxASSERT( nStartCryptFromByte <= nBufLen );
693 pBuffer = new uint8_t[nBufLen];
702 if (nBufLen - nStartCryptFromByte > 0) {
704 //DumpMem(lpBuf, nBufLen, wxT("Pre-encryption:"));
705 m_pfiSendBuffer.RC4Crypt((uint8*)lpBuf + nStartCryptFromByte, pBuffer + nStartCryptFromByte, nBufLen - nStartCryptFromByte);
706 //DumpMem(pBuffer, nBufLen, wxT("Post-encryption:"));
716 m_pfiSendBuffer.Append(pBuffer, nBufLen);
730 nBufLen = (uint32)m_pfiSendBuffer.GetLength();
739 CSocketClientProxy::Write(pBuffer, nBufLen);
745 m_pfiSendBuffer.Write(pBuffer, nBufLen);
749 if (result < nBufLen) {
752 m_pfiSendBuffer.Write(pBuffer + result, nBufLen - result);