Debian Codegraph @

crt/aws-c-mqtt/source/shared.c

raw symbols SCIP
1 /**
2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 * SPDX-License-Identifier: Apache-2.0.
4 */
5
6 #include <aws/mqtt/private/shared.h>
7
8 #include <aws/http/request_response.h>
9
10 /*
11 * These defaults were chosen because they're commmon in other MQTT libraries.
12 * The user can modify the request in their transform callback if they need to.
13 */
14 static const struct aws_byte_cursor s_websocket_handshake_default_path = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("/mqtt");
15 const struct aws_byte_cursor *g_websocket_handshake_default_path = &s_websocket_handshake_default_path;
16
17 static const struct aws_http_header s_websocket_handshake_default_protocol_header = {
18 .name = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("Sec-WebSocket-Protocol"),
19 .value = AWS_BYTE_CUR_INIT_FROM_STRING_LITERAL("mqtt"),
20 };
21 const struct aws_http_header *g_websocket_handshake_default_protocol_header =
22 &s_websocket_handshake_default_protocol_header;