diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-27 16:51:50 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2014-03-27 16:51:50 +0000 |
commit | 2946a9152c829984a0e32b7718e00c7f102821b3 (patch) | |
tree | 33064e40798f6ec7ab49f1e5ed2a4abac60796af /src/include/gnunet_transport_service.h | |
parent | 25fea659b134e2716aa95edc8f6267603e08ce61 (diff) | |
download | gnunet-2946a9152c829984a0e32b7718e00c7f102821b3.tar.gz gnunet-2946a9152c829984a0e32b7718e00c7f102821b3.zip |
API header with disconnect call
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r-- | src/include/gnunet_transport_service.h | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 82c21d2b8..0c719d955 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h | |||
@@ -129,7 +129,7 @@ enum GNUNET_TRANSPORT_PeerState | |||
129 | GNUNET_TRANSPORT_PS_CONNECT_RECV_ATS, | 129 | GNUNET_TRANSPORT_PS_CONNECT_RECV_ATS, |
130 | 130 | ||
131 | /** | 131 | /** |
132 | * CONNECT request from other peer was SESSION_ACK'ed, waiting for | 132 | * CONNECT request from other peer was CONNECT_ACK'ed, waiting for |
133 | * SESSION_ACK. | 133 | * SESSION_ACK. |
134 | */ | 134 | */ |
135 | GNUNET_TRANSPORT_PS_CONNECT_RECV_ACK, | 135 | GNUNET_TRANSPORT_PS_CONNECT_RECV_ACK, |
@@ -461,6 +461,35 @@ GNUNET_TRANSPORT_try_connect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *t | |||
461 | 461 | ||
462 | 462 | ||
463 | /** | 463 | /** |
464 | * Ask the transport service to establish a disconnect from | ||
465 | * the given peer. | ||
466 | * | ||
467 | * @param handle connection to transport service | ||
468 | * @param target who we should try to disconnect from | ||
469 | * @param cb callback to be called when request was transmitted to transport | ||
470 | * service | ||
471 | * @param cb_cls closure for the callback @a cb | ||
472 | * @return a `struct GNUNET_TRANSPORT_TryConnectHandle` handle or | ||
473 | * NULL on failure (@a cb will not be called) | ||
474 | */ | ||
475 | struct GNUNET_TRANSPORT_TryConnectHandle * | ||
476 | GNUNET_TRANSPORT_try_disconnect (struct GNUNET_TRANSPORT_Handle *handle, | ||
477 | const struct GNUNET_PeerIdentity *target, | ||
478 | GNUNET_TRANSPORT_TryConnectCallback cb, | ||
479 | void *cb_cls); | ||
480 | |||
481 | |||
482 | /** | ||
483 | * Cancel the request to transport to try a disconnect | ||
484 | * Callback will not be called | ||
485 | * | ||
486 | * @param tch GNUNET_TRANSPORT_TryConnectHandle handle to cancel | ||
487 | */ | ||
488 | void | ||
489 | GNUNET_TRANSPORT_try_disconnect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *tch); | ||
490 | |||
491 | |||
492 | /** | ||
464 | * Opaque handle for a transmission-ready request. | 493 | * Opaque handle for a transmission-ready request. |
465 | */ | 494 | */ |
466 | struct GNUNET_TRANSPORT_TransmitHandle; | 495 | struct GNUNET_TRANSPORT_TransmitHandle; |