Next: Storing peer-specific data using the PEERSTORE service, Previous: Writing a Service, Up: Developing Applications [Contents]
FIXME: This section still needs to be updated to the lastest API!
One of the most important services in GNUnet is the
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);
|• New P2P connections:|
|• Receiving P2P Messages:|
|• Sending P2P Messages:|
|• End of P2P connections:|