From 769c3e9561ea577ca167c74286a5cd092510a5cb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 2 Feb 2014 17:38:22 +0000 Subject: removing depreated 'priority' argument from GNUNET_TRANSPORT_notify_transmit_ready --- src/include/gnunet_transport_service.h | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src/include/gnunet_transport_service.h') diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h index 7b94f2209..d4948e5ba 100644 --- a/src/include/gnunet_transport_service.h +++ b/src/include/gnunet_transport_service.h @@ -41,7 +41,7 @@ extern "C" /** * Version number of the transport API. */ -#define GNUNET_TRANSPORT_VERSION 0x00000000 +#define GNUNET_TRANSPORT_VERSION 0x00000001 /** @@ -450,6 +450,22 @@ GNUNET_TRANSPORT_try_connect_cancel (struct GNUNET_TRANSPORT_TryConnectHandle *t struct GNUNET_TRANSPORT_TransmitHandle; +/** + * Function called to notify a client about the connection begin ready + * to queue more data. @a buf will be NULL and @a size zero if the + * connection was closed for writing in the meantime. + * + * @param cls closure + * @param size number of bytes available in @a buf + * @param buf where the callee should write the message + * @return number of bytes written to @a buf + */ +typedef size_t +(*GNUNET_TRANSPORT_TransmitReadyNotify) (void *cls, + size_t size, + void *buf); + + /** * Check if we could queue a message of the given size for * transmission. The transport service will take both its internal @@ -459,7 +475,6 @@ struct GNUNET_TRANSPORT_TransmitHandle; * @param handle connection to transport service * @param target who should receive the message * @param size how big is the message we want to transmit? - * @param priority how important is the message? @deprecated - remove? * @param timeout after how long should we give up (and call * notify with buf NULL and size 0)? * @param notify function to call when we are ready to @@ -473,9 +488,8 @@ struct GNUNET_TRANSPORT_TransmitHandle * GNUNET_TRANSPORT_notify_transmit_ready (struct GNUNET_TRANSPORT_Handle *handle, const struct GNUNET_PeerIdentity *target, size_t size, - uint32_t priority, struct GNUNET_TIME_Relative timeout, - GNUNET_CONNECTION_TransmitReadyNotify notify, + GNUNET_TRANSPORT_TransmitReadyNotify notify, void *notify_cls); -- cgit v1.2.3