Skip to content
Snippets Groups Projects
Commit 6ec47e61 authored by Gianluca's avatar Gianluca
Browse files

da finire

parent 72c8b562
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -50,6 +50,9 @@ int main(int argc, char *argv[]) {
for (int i = 0; i < iterations; ++i) {
printf("Inserisci un valore: ");
scanf("%s", buffer);
buffer[strlen(buffer)] = '\0';
printf(">>>DEBUG\n%s\n", buffer);
sendto(simpleSocket, buffer, strlen(buffer), 0,
(struct sockaddr *)&clientAddr, sizeof(clientAddr));
......
No preview for this file type
......@@ -79,6 +79,10 @@ int main(int argc, char *argv[]) {
recvfrom(simpleSocket, buffer, MAXSIZEBUFFER, 0,
(struct sockaddr *)&clientAddr, &clientSize);
buffer[strlen(buffer)] = '\0';
printf(">>>DEBUG\n%s\n", buffer);
int val = atoi(buffer);
if (isFirstIteration || val > max) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment