Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
J'en ai marre de faire des messages detailles. 'Current state' ;)
[simgrid.git] / include / transport.h
1 /* $Id$ */
2
3 /* trp (transport) - send/receive a bunch of bytes                          */
4
5 /* This file implements the public interface of this module, exported to the*/
6 /*  other modules of GRAS, but not to the end user.                         */
7
8 /* Authors: Martin Quinson                                                  */
9 /* Copyright (C) 2004 Martin Quinson.                                       */
10
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. */
13
14 #ifndef GRAS_TRANSPORT_H
15 #define GRAS_TRANSPORT_H
16
17 typedef struct s_gras_socket gras_socket_t;
18
19 /* A plugin type */
20 typedef struct gras_trp_plugin_ gras_trp_plugin_t;
21
22 /* Module, and get plugin by name */
23 gras_error_t gras_trp_init(void);
24
25 void         gras_trp_exit(void);
26
27 gras_error_t gras_socket_client(const char *host,
28                                 unsigned short port,
29                                 unsigned int bufSize,
30                                 /* OUT */ gras_socket_t **dst);
31 gras_error_t gras_socket_server(unsigned short port,
32                                 unsigned int bufSize,
33                                 /* OUT */ gras_socket_t **dst);
34 void         gras_socket_close(gras_socket_t *sd);
35  
36    
37 gras_error_t gras_trp_bloc_send(gras_socket_t *sd,
38                                 void *data,
39                                 size_t size);
40 gras_error_t gras_trp_bloc_recv(gras_socket_t *sd,
41                                 void *data,
42                                 size_t size);
43
44 #endif /* GRAS_TRANSPORT_H */