aboutsummaryrefslogtreecommitdiff
path: root/src/examples/websocket_chatserver_example.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/examples/websocket_chatserver_example.c')
-rw-r--r--src/examples/websocket_chatserver_example.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/examples/websocket_chatserver_example.c b/src/examples/websocket_chatserver_example.c
index 519538bd..08c86192 100644
--- a/src/examples/websocket_chatserver_example.c
+++ b/src/examples/websocket_chatserver_example.c
@@ -52,7 +52,7 @@
52 52
53 53
54/* 54/*
55 * Specifiy with this constant whether or not to use HTTPS. 55 * Specify with this constant whether or not to use HTTPS.
56 * 0 means HTTP, 1 means HTTPS. 56 * 0 means HTTP, 1 means HTTPS.
57 * Please note that you must enter a valid private key/certificate pair 57 * Please note that you must enter a valid private key/certificate pair
58 * in the main procedure to running this example with HTTPS. 58 * in the main procedure to running this example with HTTPS.
@@ -505,7 +505,7 @@
505 // "\n" \ 505 // "\n" \
506 // " /**\n" \ 506 // " /**\n" \
507 // " This is the event when the socket has received a message.\n" \ 507 // " This is the event when the socket has received a message.\n" \
508 // " This will parse the message and execute the corresponing command (or add the message).\n" \ 508 // " This will parse the message and execute the corresponding command (or add the message).\n" \
509 // " */\n" \ 509 // " */\n" \
510 // " function socket_onmessage(event)\n" \ 510 // " function socket_onmessage(event)\n" \
511 // " {\n" \ 511 // " {\n" \
@@ -669,7 +669,7 @@ struct Message
669 /* The data of the message. */ 669 /* The data of the message. */
670 char*data; 670 char*data;
671 size_t data_len; 671 size_t data_len;
672 /* Specifies wheter the data is UTF-8 encoded text (0) or binary data (1) */ 672 /* Specifies whether the data is UTF-8 encoded text (0) or binary data (1) */
673 int is_binary; 673 int is_binary;
674}; 674};
675 675
@@ -2114,7 +2114,7 @@ upgrade_handler (void *cls,
2114 2114
2115 2115
2116/** 2116/**
2117 * Function called by the MHD_daemon when the client trys to access a page. 2117 * Function called by the MHD_daemon when the client tries to access a page.
2118 * 2118 *
2119 * This is used to provide the main page 2119 * This is used to provide the main page
2120 * (in this example HTML + CSS + JavaScript is all in the same file) 2120 * (in this example HTML + CSS + JavaScript is all in the same file)
@@ -2281,7 +2281,7 @@ access_handler (void *cls,
2281 * 2. "Upgrade: websocket" 2281 * 2. "Upgrade: websocket"
2282 * 3. "Sec-WebSocket-Accept: <base64value>" 2282 * 3. "Sec-WebSocket-Accept: <base64value>"
2283 * The value for Sec-WebSocket-Accept can be generated with MHD_websocket_create_accept. 2283 * The value for Sec-WebSocket-Accept can be generated with MHD_websocket_create_accept.
2284 * It requires the value of the Sec-WebSocket-Key header of the reqeust. 2284 * It requires the value of the Sec-WebSocket-Key header of the request.
2285 * See also: https://tools.ietf.org/html/rfc6455#section-4.2.2 2285 * See also: https://tools.ietf.org/html/rfc6455#section-4.2.2
2286 */ 2286 */
2287 MHD_add_response_header (response, 2287 MHD_add_response_header (response,