From 7f07f09d52aed7c449a330d8a82c1280776e49e0 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sat, 21 Oct 2017 16:37:12 +0000 Subject: move docmentation to separate folder --- doc/documentation/tutorial-examples/006.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 doc/documentation/tutorial-examples/006.c (limited to 'doc/documentation/tutorial-examples/006.c') diff --git a/doc/documentation/tutorial-examples/006.c b/doc/documentation/tutorial-examples/006.c new file mode 100644 index 0000000000..944d2b18c7 --- /dev/null +++ b/doc/documentation/tutorial-examples/006.c @@ -0,0 +1,31 @@ +static void +handle_fix (void *cls, const struct MyMessage *msg) +{ + // process 'msg' +} + +static int +check_var (void *cls, const struct MyVarMessage *msg) +{ + // check 'msg' is well-formed + return GNUNET_OK; +} + +static void +handle_var (void *cls, const struct MyVarMessage *msg) +{ + // process 'msg' +} + +struct GNUNET_MQ_MessageHandler handlers[] = { + GNUNET_MQ_hd_fixed_size (fix, + GNUNET_MESSAGE_TYPE_MY_FIX, + struct MyMessage, + NULL), + GNUNET_MQ_hd_fixed_size (var, + GNUNET_MESSAGE_TYPE_MY_VAR, + struct MyVarMessage, + NULL), + + GNUNET_MQ_handler_end () +}; -- cgit v1.2.3-70-g09d2