aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_mq_lib.h
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-10-16 19:13:45 +0000
committerFlorian Dold <florian.dold@gmail.com>2016-10-16 19:13:45 +0000
commitbc57c1cebf65b9d10c97961cc0cd8a7bf166d76e (patch)
treef0d057680247821ccaf769246ba361b94aa1225a /src/include/gnunet_mq_lib.h
parent9df183774b9b2b4cef897cb4f66240bb8c2198ec (diff)
downloadgnunet-bc57c1cebf65b9d10c97961cc0cd8a7bf166d76e.tar.gz
gnunet-bc57c1cebf65b9d10c97961cc0cd8a7bf166d76e.zip
Add evict functionalty to mq cancellation.
Useful to avoid copying of buffers when canceling a partially sent message.
Diffstat (limited to 'src/include/gnunet_mq_lib.h')
-rw-r--r--src/include/gnunet_mq_lib.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/include/gnunet_mq_lib.h b/src/include/gnunet_mq_lib.h
index 08434698e..b339fe0eb 100644
--- a/src/include/gnunet_mq_lib.h
+++ b/src/include/gnunet_mq_lib.h
@@ -726,6 +726,24 @@ GNUNET_MQ_impl_current (struct GNUNET_MQ_Handle *mq);
726 726
727 727
728/** 728/**
729 * Get the message that is currently being sent when cancellation of that
730 * message is requested. Returns an opaque pointer which contains the memory
731 * for the message, as well as some control data used by mq.
732 *
733 * This function may be called at most once in the cancel_impl
734 * function of a message queue.
735 *
736 * Use this function to avoid copying a half-sent message.
737 *
738 * @param mq message queue
739 * @parem msg pointer to store the message being canceled
740 * @return memory block that contains the message, must be freed by the caller
741 */
742void *
743GNUNET_MQ_impl_cancel_evict (struct GNUNET_MQ_Handle *mq, struct GNUNET_MessageHeader **msg);
744
745
746/**
729 * Get the implementation state associated with the 747 * Get the implementation state associated with the
730 * message queue. 748 * message queue.
731 * 749 *