shared_constants.c 955 B

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