Commit 18c34a76 authored by cdf009's avatar cdf009

help2

parent 4dac875f
......@@ -130,13 +130,13 @@ main (int argc, char* argv[]) {
// receive the string sent by client
strcpy(in_msg, "");
recv(sd2, in_msg, BUFFER_SIZE, 0);
recv(sd2, &in_msg, BUFFER_SIZE, 0);
printf("done");
// send the received string back to client
//send(sd, buf, len flags);
send(sd2, in_msg, BUFFER_SIZE, 0);
send(sd2, &in_msg, BUFFER_SIZE, 0);
close(sd2);
}
......
......@@ -107,13 +107,13 @@ main(int argc, char* argv[]) {
}
// send message to server
send(sd, in_msg, BUFFER_SIZE, 0);
send(sd, &in_msg, BUFFER_SIZE, 0);
printf("sent");
// send the received string back to client
printf("\n");
// //send(sd, buf, len flags);
strcpy(in_msg, "");
recv(sd, in_msg, BUFFER_SIZE, 0);
recv(sd, &in_msg, BUFFER_SIZE, 0);
//
// receive message echoed back by server
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment