GNUnet 0.22.2
GNUNET_DHTU_PluginFunctions Struct Reference

struct returned by the initialization function of the plugin More...

#include <gnunet_dhtu_plugin.h>

Collaboration diagram for GNUNET_DHTU_PluginFunctions:
[legend]

Data Fields

void * cls
 Closure to pass to all plugin functions. More...
 
void(* try_connect )(void *cls, const struct GNUNET_PeerIdentity *pid, const char *address)
 Request creation of a session with a peer at the given address. More...
 
struct GNUNET_DHTU_PreferenceHandle *(* hold )(void *cls, struct GNUNET_DHTU_Target *target)
 Request underlay to keep the connection to target alive if possible. More...
 
void(* drop )(struct GNUNET_DHTU_PreferenceHandle *ph)
 Do no longer request underlay to keep the connection alive. More...
 
void(* send )(void *cls, struct GNUNET_DHTU_Target *target, const void *msg, size_t msg_size, GNUNET_SCHEDULER_TaskCallback finished_cb, void *finished_cb_cls)
 Send message to some other participant over the network. More...
 

Detailed Description

struct returned by the initialization function of the plugin

Definition at line 166 of file gnunet_dhtu_plugin.h.

Field Documentation

◆ cls

void* GNUNET_DHTU_PluginFunctions::cls

Closure to pass to all plugin functions.

Definition at line 171 of file gnunet_dhtu_plugin.h.

Referenced by DHTU_gnunet_init(), and DHTU_ip_init().

◆ try_connect

void(* GNUNET_DHTU_PluginFunctions::try_connect) (void *cls, const struct GNUNET_PeerIdentity *pid, const char *address)

Request creation of a session with a peer at the given address.

Parameters
clsclosure (internal context for the plugin)
pidtarget identity of the peer to connect to
addresstarget address URI to connect to

Definition at line 180 of file gnunet_dhtu_plugin.h.

Referenced by DHTU_gnunet_init(), and DHTU_ip_init().

◆ hold

struct GNUNET_DHTU_PreferenceHandle *(* GNUNET_DHTU_PluginFunctions::hold) (void *cls, struct GNUNET_DHTU_Target *target)

Request underlay to keep the connection to target alive if possible.

Hold may be called multiple times to express a strong preference to keep a connection, say because a target is in multiple tables.

Parameters
clsclosure
targetconnection to keep alive

Definition at line 180 of file gnunet_dhtu_plugin.h.

Referenced by DHTU_gnunet_init(), and DHTU_ip_init().

◆ drop

void(* GNUNET_DHTU_PluginFunctions::drop) (struct GNUNET_DHTU_PreferenceHandle *ph)

Do no longer request underlay to keep the connection alive.

Parameters
clsclosure
targetconnection to keep alive

Definition at line 204 of file gnunet_dhtu_plugin.h.

Referenced by DHTU_gnunet_init(), and DHTU_ip_init().

◆ send

void(* GNUNET_DHTU_PluginFunctions::send) (void *cls, struct GNUNET_DHTU_Target *target, const void *msg, size_t msg_size, GNUNET_SCHEDULER_TaskCallback finished_cb, void *finished_cb_cls)

Send message to some other participant over the network.

Note that sending is not guaranteeing that the other peer actually received the message. For any given target, the DHT must wait for the finished_cb to be called before calling send() again.

Parameters
clsclosure (internal context for the plugin)
targetreceiver identification
msgmessage
msg_sizenumber of bytes in msg
finished_cbfunction called once transmission is done (not called if target disconnects, then only the disconnect_cb is called).
finished_cb_clsclosure for finished_cb

Definition at line 222 of file gnunet_dhtu_plugin.h.

Referenced by DHTU_gnunet_init(), and DHTU_ip_init().


The documentation for this struct was generated from the following file: