statistics.c 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /**
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. * SPDX-License-Identifier: Apache-2.0.
  4. */
  5. #include <aws/io/statistics.h>
  6. #include <aws/io/channel.h>
  7. #include <aws/io/logging.h>
  8. int aws_crt_statistics_socket_init(struct aws_crt_statistics_socket *stats) {
  9. AWS_ZERO_STRUCT(*stats);
  10. stats->category = AWSCRT_STAT_CAT_SOCKET;
  11. return AWS_OP_SUCCESS;
  12. }
  13. void aws_crt_statistics_socket_cleanup(struct aws_crt_statistics_socket *stats) {
  14. (void)stats;
  15. }
  16. void aws_crt_statistics_socket_reset(struct aws_crt_statistics_socket *stats) {
  17. stats->bytes_read = 0;
  18. stats->bytes_written = 0;
  19. }
  20. int aws_crt_statistics_tls_init(struct aws_crt_statistics_tls *stats) {
  21. AWS_ZERO_STRUCT(*stats);
  22. stats->category = AWSCRT_STAT_CAT_TLS;
  23. stats->handshake_status = AWS_TLS_NEGOTIATION_STATUS_NONE;
  24. return AWS_OP_SUCCESS;
  25. }
  26. void aws_crt_statistics_tls_cleanup(struct aws_crt_statistics_tls *stats) {
  27. (void)stats;
  28. }
  29. void aws_crt_statistics_tls_reset(struct aws_crt_statistics_tls *stats) {
  30. /*
  31. * We currently don't have any resettable tls statistics yet, but they may be added in the future.
  32. */
  33. (void)stats;
  34. }