aboutsummaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_template.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-01-15 09:38:53 +0000
committerChristian Grothoff <christian@grothoff.org>2010-01-15 09:38:53 +0000
commit697aa41b1e22503e2eb2d8802bdaf627b3931997 (patch)
tree94db401e3973e955cf72b373efe325d344349161 /src/transport/plugin_transport_template.c
parent38ab83f306e3e627af5140aaf8875bf2e1cc6241 (diff)
downloadgnunet-697aa41b1e22503e2eb2d8802bdaf627b3931997.tar.gz
gnunet-697aa41b1e22503e2eb2d8802bdaf627b3931997.zip
simplifying transport plugin API
Diffstat (limited to 'src/transport/plugin_transport_template.c')
-rw-r--r--src/transport/plugin_transport_template.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/transport/plugin_transport_template.c b/src/transport/plugin_transport_template.c
index 95fd2de5f..1d949f345 100644
--- a/src/transport/plugin_transport_template.c
+++ b/src/transport/plugin_transport_template.c
@@ -163,9 +163,6 @@ template_plugin_validate (void *cls,
163 * a message using the plugin. 163 * a message using the plugin.
164 * 164 *
165 * @param cls closure 165 * @param cls closure
166 * @param plugin_context value we were asked to pass to this plugin
167 * to respond to the given peer (use is optional,
168 * but may speed up processing), can be NULL
169 * @param service_context value passed to the transport-service 166 * @param service_context value passed to the transport-service
170 * to identify the neighbour 167 * to identify the neighbour
171 * @param target who should receive this message 168 * @param target who should receive this message
@@ -177,12 +174,9 @@ template_plugin_validate (void *cls,
177 * for the next transmission call; or if the 174 * for the next transmission call; or if the
178 * peer disconnected...) 175 * peer disconnected...)
179 * @param cont_cls closure for cont 176 * @param cont_cls closure for cont
180 * @return plugin_context that should be used next time for
181 * sending messages to the specified peer
182 */ 177 */
183static void * 178static void
184template_plugin_send (void *cls, 179template_plugin_send (void *cls,
185 void *plugin_context,
186 struct ReadyList *service_context, 180 struct ReadyList *service_context,
187 const struct GNUNET_PeerIdentity *target, 181 const struct GNUNET_PeerIdentity *target,
188 unsigned int priority, 182 unsigned int priority,
@@ -192,18 +186,16 @@ template_plugin_send (void *cls,
192 void *cont_cls) 186 void *cont_cls)
193{ 187{
194 // struct Plugin *plugin = cls; 188 // struct Plugin *plugin = cls;
195 return NULL;
196} 189}
197 190
198 191
199 192
200/** 193/**
194 * Function that can be used to force the plugin to disconnect
195 * from the given peer and cancel all previous transmissions
196 * (and their continuationc).
201 * 197 *
202 * @param cls closure 198 * @param cls closure
203 * @param plugin_context value we were asked to pass to this plugin
204 * to respond to the given peer (use is optional,
205 * but may speed up processing), can be NULL (if
206 * NULL was returned from the transmit function)
207 * @param service_context must correspond to the service context 199 * @param service_context must correspond to the service context
208 * of the corresponding Transmit call; the plugin should 200 * of the corresponding Transmit call; the plugin should
209 * not cancel a send call made with a different service 201 * not cancel a send call made with a different service
@@ -213,7 +205,6 @@ template_plugin_send (void *cls,
213 */ 205 */
214static void 206static void
215template_plugin_cancel (void *cls, 207template_plugin_cancel (void *cls,
216 void *plugin_context,
217 struct ReadyList *service_context, 208 struct ReadyList *service_context,
218 const struct GNUNET_PeerIdentity *target) 209 const struct GNUNET_PeerIdentity *target)
219{ 210{