aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_core_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2017-01-17 14:41:50 +0100
committerChristian Grothoff <christian@grothoff.org>2017-01-17 14:41:50 +0100
commitfa99007bded5999327a2127689dba8d061973c82 (patch)
tree8d80e8d5a02afe9f6ef879fe384e6c1f0a8f8a1e /src/include/gnunet_core_service.h
parent23c86a4ca5d1cd879550cd07afed4869475fb765 (diff)
downloadgnunet-fa99007bded5999327a2127689dba8d061973c82.tar.gz
gnunet-fa99007bded5999327a2127689dba8d061973c82.zip
dead code elimination
Diffstat (limited to 'src/include/gnunet_core_service.h')
-rw-r--r--src/include/gnunet_core_service.h43
1 files changed, 0 insertions, 43 deletions
diff --git a/src/include/gnunet_core_service.h b/src/include/gnunet_core_service.h
index 7d99563ea..8136770b7 100644
--- a/src/include/gnunet_core_service.h
+++ b/src/include/gnunet_core_service.h
@@ -110,49 +110,6 @@ typedef void
110 110
111 111
112/** 112/**
113 * Functions with this signature are called whenever a message is
114 * received or transmitted.
115 *
116 * @param cls closure (set from #GNUNET_CORE_connect)
117 * @param peer the other peer involved (sender or receiver, NULL
118 * for loopback messages where we are both sender and receiver)
119 * @param message the actual message
120 * @return #GNUNET_OK to keep the connection open,
121 * #GNUNET_SYSERR to close connection to the peer (signal serious error)
122 */
123typedef int
124(*GNUNET_CORE_MessageCallback) (void *cls,
125 const struct GNUNET_PeerIdentity *other,
126 const struct GNUNET_MessageHeader *message);
127
128
129/**
130 * Message handler. Each struct specifies how to handle on particular
131 * type of message received.
132 */
133struct GNUNET_CORE_MessageHandler
134{
135 /**
136 * Function to call for messages of @e type.
137 */
138 GNUNET_CORE_MessageCallback callback;
139
140 /**
141 * Type of the message this handler covers.
142 */
143 uint16_t type;
144
145 /**
146 * Expected size of messages of this type. Use 0 for variable-size.
147 * If non-zero, messages of the given type will be discarded if they
148 * do not have the right size.
149 */
150 uint16_t expected_size;
151
152};
153
154
155/**
156 * Function called after #GNUNET_CORE_connect has succeeded (or failed 113 * Function called after #GNUNET_CORE_connect has succeeded (or failed
157 * for good). Note that the private key of the peer is intentionally 114 * for good). Note that the private key of the peer is intentionally
158 * not exposed here; if you need it, your process should try to read 115 * not exposed here; if you need it, your process should try to read