- gras_error_t (*chunk_send)(gras_socket_t *sd,
- char *data,
- size_t size);
- gras_error_t (*chunk_recv)(gras_socket_t *sd,
- char *Data,
- size_t size);
-
- void *specific;
- void (*free_specific)(void *);
+ xbt_error_t (*chunk_send)(gras_socket_t sd,
+ const char *data,
+ unsigned long int size);
+ xbt_error_t (*chunk_recv)(gras_socket_t sd,
+ char *data,
+ unsigned long int size);
+
+ /* flush has to make sure that the pending communications are achieved */
+ xbt_error_t (*flush)(gras_socket_t sd);
+
+ void *data; /* plugin-specific data */
+
+ /* exit is responsible for freeing data and telling the OS this plugin goes */
+ /* exit=NULL, data gets freed. (ie exit function needed only when data contains pointers) */
+ void (*exit)(gras_trp_plugin_t *);