diff options
author | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-11 22:04:27 +0000 |
---|---|---|
committer | Matthias Wachs <wachs@net.in.tum.de> | 2011-08-11 22:04:27 +0000 |
commit | cb11932b64344bc9bde5f5163eefdfc059946c9a (patch) | |
tree | b7f02a55d2ba78322a190617d809733527d21194 /src/transport/transport-testing.h | |
parent | c34cc2e767ce2e48787148694c810602f19f7d5e (diff) | |
download | gnunet-cb11932b64344bc9bde5f5163eefdfc059946c9a.tar.gz gnunet-cb11932b64344bc9bde5f5163eefdfc059946c9a.zip |
cb wrapper for connecting peers
Diffstat (limited to 'src/transport/transport-testing.h')
-rw-r--r-- | src/transport/transport-testing.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/transport/transport-testing.h b/src/transport/transport-testing.h index 2c45ca67c..8e67944ba 100644 --- a/src/transport/transport-testing.h +++ b/src/transport/transport-testing.h | |||
@@ -41,13 +41,23 @@ struct PeerContext | |||
41 | struct GNUNET_TRANSPORT_Handle *th; | 41 | struct GNUNET_TRANSPORT_Handle *th; |
42 | struct GNUNET_PeerIdentity id; | 42 | struct GNUNET_PeerIdentity id; |
43 | struct GNUNET_OS_Process *arm_proc; | 43 | struct GNUNET_OS_Process *arm_proc; |
44 | |||
45 | GNUNET_TRANSPORT_ReceiveCallback rec; | ||
46 | GNUNET_TRANSPORT_NotifyConnect nc; | ||
47 | GNUNET_TRANSPORT_NotifyDisconnect nd; | ||
48 | void * cb_cls; | ||
49 | |||
44 | char * servicehome; | 50 | char * servicehome; |
45 | }; | 51 | }; |
46 | 52 | ||
47 | typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1, struct PeerContext * p2, void *cls); | 53 | typedef void (*GNUNET_TRANSPORT_TESTING_connect_cb) (struct PeerContext * p1, struct PeerContext * p2, void *cls); |
48 | 54 | ||
49 | struct PeerContext * | 55 | struct PeerContext * |
50 | GNUNET_TRANSPORT_TESTING_start_peer (const char * cfgname); | 56 | GNUNET_TRANSPORT_TESTING_start_peer (const char * cfgname, |
57 | GNUNET_TRANSPORT_ReceiveCallback rec, | ||
58 | GNUNET_TRANSPORT_NotifyConnect nc, | ||
59 | GNUNET_TRANSPORT_NotifyDisconnect nd, | ||
60 | void * cb_cls); | ||
51 | 61 | ||
52 | void | 62 | void |
53 | GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext * pc); | 63 | GNUNET_TRANSPORT_TESTING_stop_peer (struct PeerContext * pc); |