Код: Выделить всё
int TcpClient::Recv(std::vector& buf, size_t toRecv){
int total = 0;
do{
int nRecv = SSL_read(ssl, buf.data() + total, toRecv - total);
if(nRecv
Подробнее здесь: [url]https://stackoverflow.com/questions/78689512/how-to-properly-read-over-tcp-when-size-is-not-known[/url]