Next: , Previous: , Up: Developing Applications   [Contents]

4.5 Interacting directly with other Peers using the CORE Service

FIXME: This section still needs to be updated to the lastest API!

One of the most important services in GNUnet is the CORE service managing connections between peers and handling encryption between peers.

One of the first things any service that extends the P2P protocol typically does is connect to the CORE service using:

#include <gnunet/gnunet_core_service.h>

struct GNUNET_CORE_Handle *
GNUNET_CORE_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
                     void *cls,
                     GNUNET_CORE_StartupCallback init,
                     GNUNET_CORE_ConnectEventHandler connects,
                     GNUNET_CORE_DisconnectEventHandler disconnects,
                     const struct GNUNET_MQ_MessageHandler *handlers);