summaryrefslogtreecommitdiff
path: root/toxcore/TCP_connection.c
diff options
context:
space:
mode:
authorMaxim Biro <nurupo.contributions@gmail.com>2017-04-16 05:57:21 -0400
committerMaxim Biro <nurupo.contributions@gmail.com>2017-04-22 15:31:25 -0400
commitc7f63737ebfff2d1948ec9d6d92295a75d75cae5 (patch)
treeffaa46d8aecb53041ed61f6be73a4743fae6d4b1 /toxcore/TCP_connection.c
parent5ed37e543825c023163adba95b99ea81d3337196 (diff)
Revert "Implement tox_loop"
This reverts commit 5ff099763b1f56414572e1c12eb2f003117db5a0.
Diffstat (limited to 'toxcore/TCP_connection.c')
-rw-r--r--toxcore/TCP_connection.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/toxcore/TCP_connection.c b/toxcore/TCP_connection.c
index 9b51443d..18c1e76e 100644
--- a/toxcore/TCP_connection.c
+++ b/toxcore/TCP_connection.c
@@ -67,37 +67,6 @@ const uint8_t *tcp_connections_public_key(const TCP_Connections *tcp_c)
67} 67}
68 68
69 69
70/**
71 * Return number of elements of TCP connection array.
72 *
73 * @param tcp_c struct containing TCP_con array
74 *
75 * @return number of elements of TCP connection array
76 */
77uint32_t tcp_connections_length(const TCP_Connections *tcp_c)
78{
79 return tcp_c->tcp_connections_length;
80}
81
82
83/**
84 * Return TCP connection stored at "idx" position.
85 *
86 * @param tcp_c struct containing TCP_con array
87 * @param idx index of TCP connection to return (values from 0 to tcp_connections_length() - 1)
88 *
89 * @return TCP connection stored at "idx" position, or NULL if errors occurred
90 */
91const TCP_con *tcp_connections_connection_at(const TCP_Connections *tcp_c, uint32_t idx)
92{
93 if (idx >= tcp_c->tcp_connections_length) {
94 return NULL;
95 }
96
97 return &tcp_c->tcp_connections[idx];
98}
99
100
101/* Set the size of the array to num. 70/* Set the size of the array to num.
102 * 71 *
103 * return -1 if realloc fails. 72 * return -1 if realloc fails.