diff --git a/maxq10xx/README.md b/maxq10xx/README.md index ed69c908..1fc8f9f1 100644 --- a/maxq10xx/README.md +++ b/maxq10xx/README.md @@ -137,12 +137,11 @@ associated commands as shown. The server will print very little status information about the algorithms and ciphersuite negotiated. It will wait for a message from the client. -The client will give lots of debug and status logging. It will then prompt the -user for a message. You should type in something like "Hello, this is MAXQ!" and -press enter. +The client will give lots of debug and status logging. It will then send the +message "Hello from MAXQ10xx!". -The server will print out the message you typed, send the message "I hear you -fa shizzle!" and then terminate. +The server will print out the message it received and send the message "I hear +you fa shizzle!" and then terminate. The client will print the message it received from the server along with more debug and status logging and then terminate. diff --git a/maxq10xx/maxq10xx-wolfssl-client.c b/maxq10xx/maxq10xx-wolfssl-client.c index 8559b5fc..c0e19ff9 100644 --- a/maxq10xx/maxq10xx-wolfssl-client.c +++ b/maxq10xx/maxq10xx-wolfssl-client.c @@ -64,6 +64,8 @@ /* Please set the server's address and the port it listens on */ #define DEFAULT_SERVER "127.0.0.1" #define DEFAULT_PORT 11111 +#define MESSAGE "Hello from MAXQ10xx!" +#define MESSAGE_LEN 20 /* ------------------------------------ */ /* No modifications required below here */ @@ -338,18 +340,8 @@ int main(int argc, char** argv) goto exit; } - /* Get a message for the server from stdin */ - printf("Message for server: "); - memset(buff, 0, sizeof(buff)); - if (fgets(buff, sizeof(buff), stdin) == NULL) { - fprintf(stderr, "ERROR: failed to get message for server\n"); - ret = -1; - goto exit; - } - len = strnlen(buff, sizeof(buff)); - /* Send the message to the server */ - if ((ret = wolfSSL_write(ssl, buff, len)) != len) { + if ((ret = wolfSSL_write(ssl, MESSAGE, MESSAGE_LEN)) != len) { fprintf(stderr, "ERROR: failed to write entire message\n"); fprintf(stderr, "%d bytes of %d bytes were sent", ret, (int) len); goto exit;