gras_error_t gras_trp_chunk_recv(gras_socket_t *sd,
char *data,
long int size);
+gras_error_t gras_trp_flush(gras_socket_t *sd);
/* Find which socket needs to be read next */
gras_error_t
gras_socket_t **dst);
-/***
- *** Module declaration
- ***/
-gras_error_t gras_trp_init(void);
-void gras_trp_exit(void);
-
/***
*** Plugin mecanism
***/
void (*socket_close)(gras_socket_t *sd);
gras_error_t (*chunk_send)(gras_socket_t *sd,
- char *data,
+ const char *data,
long int size);
gras_error_t (*chunk_recv)(gras_socket_t *sd,
char *Data,
long int size);
- void *data;
+ /* flush has to make sure that the pending communications are achieved */
+ gras_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 */
/* if it's NULL, data gets freed. (ie exit needed only when data contains pointers) */