diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-01-22 17:27:16 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-01-22 17:27:16 +0000 |
commit | 07632b2d9509b0e425967cbc80d2abd6ffc81c9d (patch) | |
tree | 905060f30d74d05304a448fe3e3cd06dad583328 /src/include/gnunet_core_service.h | |
parent | 068bd6929580eb6521c7ac40c8ae05eb632f6c58 (diff) | |
download | gnunet-07632b2d9509b0e425967cbc80d2abd6ffc81c9d.tar.gz gnunet-07632b2d9509b0e425967cbc80d2abd6ffc81c9d.zip |
use new APIs for connect/disconnect
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r-- | src/include/gnunet_core_service.h | 36 |
1 files changed, 3 insertions, 33 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h index 3ba4ef137..6f49dc71a 100644 --- a/src/include/gnunet_core_service.h +++ b/src/include/gnunet_core_service.h | |||
@@ -232,43 +232,13 @@ GNUNET_CORE_peer_request_connect (struct GNUNET_SCHEDULER_Handle *sched, | |||
232 | 232 | ||
233 | 233 | ||
234 | /** | 234 | /** |
235 | * Request that the core should try to disconnect from a particular | 235 | * Cancel a pending request to connect to a particular peer. Must not |
236 | * peer. Once the request has been transmitted to the core, the | 236 | * be called after the 'cont' function was invoked. |
237 | * continuation function will be called. Note that this does NOT mean | ||
238 | * that a connection was successfully cut -- it only means that the | ||
239 | * core will now try. Typically this will work pretty much | ||
240 | * immediately, but it is at least in theory also possible that a | ||
241 | * reconnect is also triggered rather quickly. Successful creation | ||
242 | * and destruction of connections will be signalled to the 'connects' | ||
243 | * and 'disconnects' callback arguments of 'GNUNET_CORE_connect' only. | ||
244 | * If the core service does not respond to our connection attempt | ||
245 | * within the given time frame, 'cont' will be called with the TIMEOUT | ||
246 | * reason code. | ||
247 | * | ||
248 | * @param sched scheduler to use | ||
249 | * @param cfg configuration to use | ||
250 | * @param timeout how long to try to talk to core | ||
251 | * @param cont function to call once the request has been completed (or timed out) | ||
252 | * @param cont_cls closure for cont | ||
253 | * @return NULL on error (cont will not be called), otherwise handle for cancellation | ||
254 | */ | ||
255 | struct GNUNET_CORE_PeerRequestHandle * | ||
256 | GNUNET_CORE_peer_request_disconnect (struct GNUNET_SCHEDULER_Handle *sched, | ||
257 | const struct GNUNET_CONFIGURATION_Handle *cfg, | ||
258 | struct GNUNET_TIME_Relative timeout, | ||
259 | const struct GNUNET_PeerIdentity * peer, | ||
260 | GNUNET_SCHEDULER_Task cont, | ||
261 | void *cont_cls); | ||
262 | |||
263 | |||
264 | /** | ||
265 | * Cancel a pending request to connect or disconnect from/to a particular | ||
266 | * peer. Must not be called after the 'cont' function was invoked. | ||
267 | * | 237 | * |
268 | * @param req request handle that was returned for the original request | 238 | * @param req request handle that was returned for the original request |
269 | */ | 239 | */ |
270 | void | 240 | void |
271 | GNUNET_CORE_peer_request_cancel (struct GNUNET_CORE_PeerRequestHandle *req); | 241 | GNUNET_CORE_peer_request_connect_cancel (struct GNUNET_CORE_PeerRequestHandle *req); |
272 | 242 | ||
273 | 243 | ||
274 | /** | 244 | /** |