Debian Codegraph @

crt/aws-c-io/source/statistics.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/io/statistics.h>
7
8 #include <aws/io/channel.h>
9 #include <aws/io/logging.h>
10
11 int aws_crt_statistics_socket_init(struct aws_crt_statistics_socket *stats) {
12 AWS_ZERO_STRUCT(*stats);
13 stats->category = AWSCRT_STAT_CAT_SOCKET;
14
15 return AWS_OP_SUCCESS;
16 }
17
18 void aws_crt_statistics_socket_cleanup(struct aws_crt_statistics_socket *stats) {
19 (void)stats;
20 }
21
22 void aws_crt_statistics_socket_reset(struct aws_crt_statistics_socket *stats) {
23 stats->bytes_read = 0;
24 stats->bytes_written = 0;
25 }
26
27 int aws_crt_statistics_tls_init(struct aws_crt_statistics_tls *stats) {
28 AWS_ZERO_STRUCT(*stats);
29 stats->category = AWSCRT_STAT_CAT_TLS;
30 stats->handshake_status = AWS_TLS_NEGOTIATION_STATUS_NONE;
31
32 return AWS_OP_SUCCESS;
33 }
34
35 void aws_crt_statistics_tls_cleanup(struct aws_crt_statistics_tls *stats) {
36 (void)stats;
37 }
38
39 void aws_crt_statistics_tls_reset(struct aws_crt_statistics_tls *stats) {
40 /*
41 * We currently don't have any resettable tls statistics yet, but they may be added in the future.
42 */
43 (void)stats;
44 }