aboutsummaryrefslogtreecommitdiff
path: root/src/testbed/gnunet-service-testbed.h
diff options
context:
space:
mode:
authorSree Harsha Totakura <totakura@in.tum.de>2013-10-23 16:07:00 +0000
committerSree Harsha Totakura <totakura@in.tum.de>2013-10-23 16:07:00 +0000
commit3c94b32f3ffb68b8660ebbf44b3f195c41d5372e (patch)
treee3d5af25e42fa6f5461644bcf7a8d85568ac6f1b /src/testbed/gnunet-service-testbed.h
parent3379c419925e151d86cad0fa7e9238330e5ae909 (diff)
downloadgnunet-3c94b32f3ffb68b8660ebbf44b3f195c41d5372e.tar.gz
gnunet-3c94b32f3ffb68b8660ebbf44b3f195c41d5372e.zip
- use pooled connections from connection pool module
Diffstat (limited to 'src/testbed/gnunet-service-testbed.h')
-rw-r--r--src/testbed/gnunet-service-testbed.h107
1 files changed, 0 insertions, 107 deletions
diff --git a/src/testbed/gnunet-service-testbed.h b/src/testbed/gnunet-service-testbed.h
index 55861faba..7966864b6 100644
--- a/src/testbed/gnunet-service-testbed.h
+++ b/src/testbed/gnunet-service-testbed.h
@@ -834,113 +834,6 @@ GST_cache_add_hello (const unsigned int peer_id,
834 834
835 835
836/** 836/**
837 * Functions of this type are called when the needed handle is available for
838 * usage. These functions are to be registered with either of the functions
839 * GST_cache_get_handle_transport() or GST_cache_get_handle_core(). The
840 * corresponding handles will be set and if they are not, then it signals an
841 * error while opening the handles.
842 *
843 * @param cls the closure passed to GST_cache_get_handle_transport() or
844 * GST_cache_get_handle_core()
845 * @param ch the handle to CORE. Can be NULL if it is not requested
846 * @param th the handle to TRANSPORT. Can be NULL if it is not requested
847 * @param peer_id the identity of the peer. Will be NULL if ch is NULL. In other
848 * cases, its value being NULL means that CORE connection has failed.
849 */
850typedef void (*GST_cache_handle_ready_cb) (void *cls,
851 struct GNUNET_CORE_Handle * ch,
852 struct GNUNET_TRANSPORT_Handle * th,
853 const struct GNUNET_PeerIdentity *
854 peer_id);
855
856
857/**
858 * Callback to notify when the target peer given to
859 * GST_cache_get_handle_transport() is connected. Note that this callback may
860 * not be called if the target peer is already connected. Use
861 * GNUNET_TRANSPORT_check_neighbour_connected() to check if the target peer is
862 * already connected or not. This callback will be called only once or never (in
863 * case the target cannot be connected).
864 *
865 * @param cls the closure given to GST_cache_get_handle_done() for this callback
866 * @param target the peer identity of the target peer. The pointer should be
867 * valid until GST_cache_get_handle_done() is called.
868 */
869typedef void (*GST_cache_peer_connect_notify) (void *cls,
870 const struct GNUNET_PeerIdentity
871 * target);
872
873
874/**
875 * Get a transport handle with the given configuration. If the handle is already
876 * cached before, it will be retured in the given callback; the peer_id is used to lookup in the
877 * cache. If not a new operation is started to open the transport handle and
878 * will be given in the callback when it is available.
879 *
880 * @param peer_id the index of the peer
881 * @param cfg the configuration with which the transport handle has to be
882 * created if it was not present in the cache
883 * @param cb the callback to notify when the transport handle is available
884 * @param cb_cls the closure for the above callback
885 * @param target the peer identify of the peer whose connection to our TRANSPORT
886 * subsystem will be notified through the connect_notify_cb. Can be NULL
887 * @param connect_notify_cb the callback to call when the given target peer is
888 * connected. This callback will only be called once or never again (in
889 * case the target peer cannot be connected). Can be NULL
890 * @param connect_notify_cb_cls the closure for the above callback
891 * @return the handle which can be used cancel or mark that the handle is no
892 * longer being used
893 */
894struct GSTCacheGetHandle *
895GST_cache_get_handle_transport (unsigned int peer_id,
896 const struct GNUNET_CONFIGURATION_Handle *cfg,
897 GST_cache_handle_ready_cb cb, void *cb_cls,
898 const struct GNUNET_PeerIdentity *target,
899 GST_cache_peer_connect_notify connect_notify_cb,
900 void *connect_notify_cb_cls);
901
902
903/**
904 * Get a CORE handle with the given configuration. If the handle is already
905 * cached before, it will be retured in the given callback; the peer_id is used
906 * to lookup in the cache. If the handle is not cached before, a new operation
907 * is started to open the CORE handle and will be given in the callback when it
908 * is available along with the peer identity
909 *
910 * @param peer_id the index of the peer
911 * @param cfg the configuration with which the transport handle has to be
912 * created if it was not present in the cache
913 * @param cb the callback to notify when the transport handle is available
914 * @param cb_cls the closure for the above callback
915 * @param target the peer identify of the peer whose connection to our CORE
916 * subsystem will be notified through the connect_notify_cb. Can be NULL
917 * @param connect_notify_cb the callback to call when the given target peer is
918 * connected. This callback will only be called once or never again (in
919 * case the target peer cannot be connected). Can be NULL
920 * @param connect_notify_cb_cls the closure for the above callback
921 * @return the handle which can be used cancel or mark that the handle is no
922 * longer being used
923 */
924struct GSTCacheGetHandle *
925GST_cache_get_handle_core (unsigned int peer_id,
926 const struct GNUNET_CONFIGURATION_Handle *cfg,
927 GST_cache_handle_ready_cb cb, void *cb_cls,
928 const struct GNUNET_PeerIdentity *target,
929 GST_cache_peer_connect_notify connect_notify_cb,
930 void *connect_notify_cb_cls);
931
932
933/**
934 * Mark the GetCacheHandle as being done if a handle has been provided already
935 * or as being cancelled if the callback for the handle hasn't been called.
936 *
937 * @param cgh the CacheGetHandle handle
938 */
939void
940GST_cache_get_handle_done (struct GSTCacheGetHandle *cgh);
941
942
943/**
944 * Initialize logging CPU and IO statisticfs. Checks the configuration for 837 * Initialize logging CPU and IO statisticfs. Checks the configuration for
945 * "STATS_DIR" and logs to a file in that directory. The file is name is 838 * "STATS_DIR" and logs to a file in that directory. The file is name is
946 * generated from the hostname and the process's PID. 839 * generated from the hostname and the process's PID.