I like to receive data on SOCKET. I call the recv() method with required params:
char* buff = new char[len];
memset(buff, 0, len);
if(recv(sck, buff, len, MSG_PEEK) == SOCKET_ERROR) {
cerr << "String Receive Error - code: " << WSAGetLastError() << endl;
}
The recv() method copies data to the buff. That's right. But recv() method don't removes copied data from SOCKET sck. Why and can I do anything for removing?