diff options
author | Nils Durner <durner@gnunet.org> | 2009-08-09 08:25:58 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2009-08-09 08:25:58 +0000 |
commit | b309c5f5ae339faf3632f7ee3a86520981f6523a (patch) | |
tree | 76a946e557092b5a7dd88119e2193a1849890bc0 /src/include/gnunet_network_lib.h | |
parent | 3ec9635b91ede9037261608d3d173e348c7d9bd8 (diff) | |
download | gnunet-b309c5f5ae339faf3632f7ee3a86520981f6523a.tar.gz gnunet-b309c5f5ae339faf3632f7ee3a86520981f6523a.zip |
rename NETWORK_socket API to NETWORK_connection (to make room for the new actual NET API)
Diffstat (limited to 'src/include/gnunet_network_lib.h')
-rw-r--r-- | src/include/gnunet_network_lib.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/include/gnunet_network_lib.h b/src/include/gnunet_network_lib.h index 26a39d575..68ca346e5 100644 --- a/src/include/gnunet_network_lib.h +++ b/src/include/gnunet_network_lib.h | |||
@@ -44,9 +44,9 @@ extern "C" | |||
44 | #define GNUNET_NETWORK_CONNECT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) | 44 | #define GNUNET_NETWORK_CONNECT_RETRY_TIMEOUT GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_SECONDS, 5) |
45 | 45 | ||
46 | /** | 46 | /** |
47 | * @brief handle for a network socket | 47 | * @brief handle for a network connection |
48 | */ | 48 | */ |
49 | struct GNUNET_NETWORK_SocketHandle; | 49 | struct GNUNET_NETWORK_ConnectionHandle; |
50 | 50 | ||
51 | 51 | ||
52 | /** | 52 | /** |
@@ -93,8 +93,8 @@ typedef void (*GNUNET_NETWORK_Receiver) (void *cls, | |||
93 | * 0 for sockets that need no write buffers, such as listen sockets) | 93 | * 0 for sockets that need no write buffers, such as listen sockets) |
94 | * @return the boxed socket handle | 94 | * @return the boxed socket handle |
95 | */ | 95 | */ |
96 | struct GNUNET_NETWORK_SocketHandle | 96 | struct GNUNET_NETWORK_ConnectionHandle |
97 | *GNUNET_NETWORK_socket_create_from_existing (struct GNUNET_SCHEDULER_Handle | 97 | *GNUNET_NETWORK_connection_create_from_existing (struct GNUNET_SCHEDULER_Handle |
98 | *sched, int osSocket, | 98 | *sched, int osSocket, |
99 | size_t maxbuf); | 99 | size_t maxbuf); |
100 | 100 | ||
@@ -111,8 +111,8 @@ struct GNUNET_NETWORK_SocketHandle | |||
111 | * 0 for sockets that need no write buffers, such as listen sockets) | 111 | * 0 for sockets that need no write buffers, such as listen sockets) |
112 | * @return the socket handle, NULL on error (for example, access refused) | 112 | * @return the socket handle, NULL on error (for example, access refused) |
113 | */ | 113 | */ |
114 | struct GNUNET_NETWORK_SocketHandle | 114 | struct GNUNET_NETWORK_ConnectionHandle |
115 | *GNUNET_NETWORK_socket_create_from_accept (struct GNUNET_SCHEDULER_Handle | 115 | *GNUNET_NETWORK_connection_create_from_accept (struct GNUNET_SCHEDULER_Handle |
116 | *sched, | 116 | *sched, |
117 | GNUNET_NETWORK_AccessCheck | 117 | GNUNET_NETWORK_AccessCheck |
118 | access, void *access_cls, | 118 | access, void *access_cls, |
@@ -131,8 +131,8 @@ struct GNUNET_NETWORK_SocketHandle | |||
131 | * 0 for sockets that need no write buffers, such as listen sockets) | 131 | * 0 for sockets that need no write buffers, such as listen sockets) |
132 | * @return the socket handle | 132 | * @return the socket handle |
133 | */ | 133 | */ |
134 | struct GNUNET_NETWORK_SocketHandle | 134 | struct GNUNET_NETWORK_ConnectionHandle |
135 | *GNUNET_NETWORK_socket_create_from_connect (struct GNUNET_SCHEDULER_Handle | 135 | *GNUNET_NETWORK_connection_create_from_connect (struct GNUNET_SCHEDULER_Handle |
136 | *sched, const char *hostname, | 136 | *sched, const char *hostname, |
137 | uint16_t port, size_t maxbuf); | 137 | uint16_t port, size_t maxbuf); |
138 | 138 | ||
@@ -151,8 +151,8 @@ struct GNUNET_NETWORK_SocketHandle | |||
151 | * 0 for sockets that need no write buffers, such as listen sockets) | 151 | * 0 for sockets that need no write buffers, such as listen sockets) |
152 | * @return the socket handle | 152 | * @return the socket handle |
153 | */ | 153 | */ |
154 | struct GNUNET_NETWORK_SocketHandle | 154 | struct GNUNET_NETWORK_ConnectionHandle |
155 | *GNUNET_NETWORK_socket_create_from_sockaddr (struct GNUNET_SCHEDULER_Handle | 155 | *GNUNET_NETWORK_connection_create_from_sockaddr (struct GNUNET_SCHEDULER_Handle |
156 | *sched, int af_family, | 156 | *sched, int af_family, |
157 | const struct sockaddr | 157 | const struct sockaddr |
158 | *serv_addr, socklen_t addrlen, | 158 | *serv_addr, socklen_t addrlen, |
@@ -166,7 +166,7 @@ struct GNUNET_NETWORK_SocketHandle | |||
166 | * @param sock socket to check | 166 | * @param sock socket to check |
167 | * @return GNUNET_YES if valid, GNUNET_NO otherwise | 167 | * @return GNUNET_YES if valid, GNUNET_NO otherwise |
168 | */ | 168 | */ |
169 | int GNUNET_NETWORK_socket_check (struct GNUNET_NETWORK_SocketHandle *sock); | 169 | int GNUNET_NETWORK_connection_check (struct GNUNET_NETWORK_ConnectionHandle *sock); |
170 | 170 | ||
171 | 171 | ||
172 | /** | 172 | /** |
@@ -177,7 +177,7 @@ int GNUNET_NETWORK_socket_check (struct GNUNET_NETWORK_SocketHandle *sock); | |||
177 | * @param addrlen where to store the length of the address | 177 | * @param addrlen where to store the length of the address |
178 | * @return GNUNET_OK on success | 178 | * @return GNUNET_OK on success |
179 | */ | 179 | */ |
180 | int GNUNET_NETWORK_socket_get_address (struct GNUNET_NETWORK_SocketHandle | 180 | int GNUNET_NETWORK_connection_get_address (struct GNUNET_NETWORK_ConnectionHandle |
181 | *sock, void **addr, size_t * addrlen); | 181 | *sock, void **addr, size_t * addrlen); |
182 | 182 | ||
183 | /** | 183 | /** |
@@ -187,7 +187,7 @@ int GNUNET_NETWORK_socket_get_address (struct GNUNET_NETWORK_SocketHandle | |||
187 | * | 187 | * |
188 | * @param sock socket to destroy | 188 | * @param sock socket to destroy |
189 | */ | 189 | */ |
190 | void GNUNET_NETWORK_socket_destroy (struct GNUNET_NETWORK_SocketHandle *sock); | 190 | void GNUNET_NETWORK_connection_destroy (struct GNUNET_NETWORK_ConnectionHandle *sock); |
191 | 191 | ||
192 | 192 | ||
193 | /** | 193 | /** |
@@ -205,7 +205,7 @@ void GNUNET_NETWORK_socket_destroy (struct GNUNET_NETWORK_SocketHandle *sock); | |||
205 | * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_TASK on error | 205 | * @return scheduler task ID used for receiving, GNUNET_SCHEDULER_NO_TASK on error |
206 | */ | 206 | */ |
207 | GNUNET_SCHEDULER_TaskIdentifier | 207 | GNUNET_SCHEDULER_TaskIdentifier |
208 | GNUNET_NETWORK_receive (struct GNUNET_NETWORK_SocketHandle *sock, | 208 | GNUNET_NETWORK_connection_receive (struct GNUNET_NETWORK_ConnectionHandle *sock, |
209 | size_t max, | 209 | size_t max, |
210 | struct GNUNET_TIME_Relative timeout, | 210 | struct GNUNET_TIME_Relative timeout, |
211 | GNUNET_NETWORK_Receiver receiver, void *receiver_cls); | 211 | GNUNET_NETWORK_Receiver receiver, void *receiver_cls); |
@@ -220,7 +220,7 @@ GNUNET_NETWORK_receive (struct GNUNET_NETWORK_SocketHandle *sock, | |||
220 | * @param task task identifier returned from the receive call | 220 | * @param task task identifier returned from the receive call |
221 | * @return closure of the original receiver callback | 221 | * @return closure of the original receiver callback |
222 | */ | 222 | */ |
223 | void *GNUNET_NETWORK_receive_cancel (struct GNUNET_NETWORK_SocketHandle *sock, | 223 | void *GNUNET_NETWORK_connection_receive_cancel (struct GNUNET_NETWORK_ConnectionHandle *sock, |
224 | GNUNET_SCHEDULER_TaskIdentifier task); | 224 | GNUNET_SCHEDULER_TaskIdentifier task); |
225 | 225 | ||
226 | 226 | ||
@@ -275,7 +275,7 @@ struct GNUNET_NETWORK_TransmitHandle; | |||
275 | * NULL if we are already going to notify someone else (busy) | 275 | * NULL if we are already going to notify someone else (busy) |
276 | */ | 276 | */ |
277 | struct GNUNET_NETWORK_TransmitHandle | 277 | struct GNUNET_NETWORK_TransmitHandle |
278 | *GNUNET_NETWORK_notify_transmit_ready (struct GNUNET_NETWORK_SocketHandle | 278 | *GNUNET_NETWORK_connection_notify_transmit_ready (struct GNUNET_NETWORK_ConnectionHandle |
279 | *sock, size_t size, | 279 | *sock, size_t size, |
280 | struct GNUNET_TIME_Relative timeout, | 280 | struct GNUNET_TIME_Relative timeout, |
281 | GNUNET_NETWORK_TransmitReadyNotify | 281 | GNUNET_NETWORK_TransmitReadyNotify |
@@ -289,7 +289,7 @@ struct GNUNET_NETWORK_TransmitHandle | |||
289 | * @param h handle for notification to cancel | 289 | * @param h handle for notification to cancel |
290 | */ | 290 | */ |
291 | void | 291 | void |
292 | GNUNET_NETWORK_notify_transmit_ready_cancel (struct | 292 | GNUNET_NETWORK_connection_notify_transmit_ready_cancel (struct |
293 | GNUNET_NETWORK_TransmitHandle | 293 | GNUNET_NETWORK_TransmitHandle |
294 | *h); | 294 | *h); |
295 | 295 | ||