I tried to use std::string in WSARecv (winsock), but it didnt work, can you tell me if it's possibleand and how it works
You could initalize your WSABUF structures that you pass to WSARecv, so that the *buf pointer in each WSA buf points to the buffer of a prepared string opbject, something along the lines:
std::string myStringBuffer;
myStringBuffer.resize(1024);
WSABuf wsaBuffer;
wsaBuffer.len = 1024;
wsaBuffer.buf = &myStringBuffer[0];