***/
gras_error_t gras_trp_chunk_send(gras_socket_t *sd,
char *data,
- size_t size);
+ long int size);
gras_error_t gras_trp_chunk_recv(gras_socket_t *sd,
char *data,
- size_t size);
+ long int size);
/* Find which socket needs to be read next */
gras_error_t
/* A plugin type */
typedef struct gras_trp_plugin_ gras_trp_plugin_t;
-
-/**
- * e_gras_trp_plugin:
- *
- * Caracterize each possible transport plugin
- */
-typedef enum e_gras_trp_plugin {
- e_gras_trp_plugin_undefined = 0,
-
- e_gras_trp_plugin_tcp
-} gras_trp_plugin_type_t;
-
/* A plugin type */
struct gras_trp_plugin_ {
char *name;
gras_error_t (*chunk_send)(gras_socket_t *sd,
char *data,
- size_t size);
+ long int size);
gras_error_t (*chunk_recv)(gras_socket_t *sd,
char *Data,
- size_t size);
+ long int size);
- void *specific;
- void (*free_specific)(void *);
+ void *data;
+
+ /* exit is responsible for freeing data and telling the OS this plugin goes */
+ /* if it's NULL, data gets freed. (ie exit needed only when data contains pointers) */
+ void (*exit)(gras_trp_plugin_t *);
};
gras_error_t