int tunnel,
int neighbor,
unsigned int n_paths,
- struct GNUNET_PeerIdentity *paths);
+ const struct GNUNET_PeerIdentity *paths);
/**
* @param cls Closure from #GNUNET_CADET_open_porT.
* @param channel New handle to the channel.
* @param source Peer that started this channel.
- * FIXME: Add port that this channel is created for, or is cls enough?
- * Port cannot be closed yet, #handle_channel_create would have
- * rejected it.
* @return Closure for the incoming @a channel. It's given to:
* - The #GNUNET_CADET_DisconnectEventHandler (given to
* #GNUNET_CADET_open_porT) when the channel dies.
struct GNUNET_CADET_Channel *channel,
const struct GNUNET_PeerIdentity *source);
+
/**
* Function called whenever an MQ-channel is destroyed, even if the destruction
* was requested by #GNUNET_CADET_channel_destroy.
(*GNUNET_CADET_DisconnectEventHandler) (void *cls,
const struct GNUNET_CADET_Channel *channel);
+
/**
* Function called whenever an MQ-channel's transmission window size changes.
*
* #GNUNET_CADET_ConnectEventHandler, also with a non-zero value.
*
* @param cls Channel closure.
- * @param channel Connection to the other end (henceforth invalid).
+ * @param channel Connection to the other end --- FIXME: drop?
* @param window_size New window size. If the is more messages than buffer size
- * this value will be negative..
+ * this value will be negative. -- FIXME: make unsigned, we never call negative?
*/
typedef void
(*GNUNET_CADET_WindowSizeEventHandler) (void *cls,
const struct GNUNET_CADET_Channel *channel,
int window_size);
+
/**
* Connect to the MQ-based cadet service.
*
struct GNUNET_CADET_Handle *
GNUNET_CADET_connecT (const struct GNUNET_CONFIGURATION_Handle *cfg);
+
/**
* Open a port to receive incomming MQ-based channels.
*
GNUNET_CADET_DisconnectEventHandler disconnects,
const struct GNUNET_MQ_MessageHandler *handlers);
+
/**
* Obtain the message queue for a connected channel.
*