diff --git a/pads/dec_client.c b/pads/dec_client.c index 4527416..d130c17 100644 --- a/pads/dec_client.c +++ b/pads/dec_client.c @@ -81,7 +81,7 @@ int main(int argc, char *argv[]) { // Get Cyphertext from server memset(buffer, '\0', 70001); - charsRead = recv(socketFD, buffer, 70001, 0); + charsRead = recv(socketFD, buffer, 70001, MSG_WAITALL); if (charsRead < 0) error("CLIENT: ERROR reading from socket"); //printf("strlen3: %ld\n", strlen(buffer) ); diff --git a/pads/enc_client.c b/pads/enc_client.c index 5513ace..151f2e5 100644 --- a/pads/enc_client.c +++ b/pads/enc_client.c @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) { // Get Cyphertext from server memset(buffer, '\0', sizeof(buffer)); - charsRead = recv(socketFD, buffer, sizeof(buffer) - 1, 0); + charsRead = recv(socketFD, buffer, 70001, MSG_WAITALL); //printf("%d\n", charsRead); if (charsRead < 0) error("CLIENT: ERROR reading from socket");