- gras_error_t (*bloc_send)(gras_trp_sock_t *sd,
- void *data,
- size_t size,
- double timeOut);
- gras_error_t (*bloc_recv)(gras_trp_sock_t *sd,
- void *data,
- size_t size,
- double timeOut);
- gras_error_t (*flush)(gras_trp_sock_t *sd);
-
- void *specific;
-};
-
-/**********************************************************************
- * Internal stuff to the module. Other modules shouldn't fool with it *
- **********************************************************************/
-
-/* TCP driver */
-gras_error_t gras_trp_tcp_init(void);
-void gras_trp_tcp_exit(gras_trp_plugin_t *plugin);
-gras_error_t gras_trp_tcp_socket_client(const char *host,
- unsigned short port,
- int raw,
- unsigned int bufSize,
- /* OUT */ gras_trp_sock_t **dst);
-gras_error_t gras_trp_tcp_socket_server(unsigned short port,
- int raw,
- unsigned int bufSize,
- /* OUT */ gras_trp_sock_t **dst);
-void gras_trp_tcp_socket_close(gras_trp_sock_t **sd);
-gras_error_t gras_trp_tcp_select(double timeOut,
- gras_trp_sock_t **sd);
-
-gras_error_t gras_trp_tcp_bloc_send(gras_trp_sock_t *sd,
- void *data,
- size_t size,
- double timeOut);
-
-gras_error_t gras_trp_tcp_bloc_recv(gras_trp_sock_t *sd,
- void *data,
- size_t size,
- double timeOut);
-gras_error_t gras_trp_tcp_flush(gras_trp_sock_t *sd);
+ int sd;
+ int port; /* port on this side */
+ int peer_port; /* port on the other side */
+ char *peer_name; /* hostname of the other side */