3 /* trp (transport) - send/receive a bunch of bytes */
5 /* This file implements the public interface of this module, exported to the*/
6 /* other modules of GRAS, but not to the end user. */
8 /* Authors: Martin Quinson */
9 /* Copyright (C) 2004 Martin Quinson. */
11 /* This program is free software; you can redistribute it and/or modify it
12 under the terms of the license (GNU LGPL) which comes with this package. */
14 #ifndef GRAS_TRANSPORT_H
15 #define GRAS_TRANSPORT_H
17 typedef struct s_gras_socket gras_socket_t;
20 typedef struct gras_trp_plugin_ gras_trp_plugin_t;
22 /* Module, and get plugin by name */
23 gras_error_t gras_trp_init(void);
25 void gras_trp_exit(void);
27 gras_error_t gras_socket_client(const char *host,
30 /* OUT */ gras_socket_t **dst);
31 gras_error_t gras_socket_server(unsigned short port,
33 /* OUT */ gras_socket_t **dst);
34 void gras_socket_close(gras_socket_t *sd);
37 gras_error_t gras_trp_bloc_send(gras_socket_t *sd,
40 gras_error_t gras_trp_bloc_recv(gras_socket_t *sd,
44 #endif /* GRAS_TRANSPORT_H */