Greetings, problem with recv. Takes messages together what is the error, how to fix it? If you determine in advance how here, everything is sent correctly. I want to put \ n after each adoption, but then it accepts each word that was entered, separated by a space, on a new line.
//Send char buff[512] = "Helloy client\n"; int sen = send(AcceptSocket, buff, strlen(buff), 0); while(1) { int rec = recv(AcceptSocket, buff, sizeof(buff), 0); printf("%s", buff); scanf("%s",&buff); send(AcceptSocket, buff,sizeof(buff), 0); }; Привет друг! //Отсылаем данные Приветдруг! // Такие данные придут клиенту или же если отправлены наоборот Similarly with the Client