X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/098107614ab9ead636dcdd7ec45f5d04b2202216..eed8daedf7c2d58e0db96826205f138cedb9cc5a:/include/gras/transport.h diff --git a/include/gras/transport.h b/include/gras/transport.h index 1e7ceac73e..2d8961ebf7 100644 --- a/include/gras/transport.h +++ b/include/gras/transport.h @@ -13,10 +13,26 @@ /** \addtogroup GRAS_sock * \brief Socket handling (Communication facility). + * + *
Top [\ref index]::[\ref GRAS_API] + *
Prev [\ref GRAS_dd] + *
Next [\ref GRAS_msg] + *
Down [\ref GRAS_sock_create]
+ * + * The model of communications in GRAS is very close to the BSD socket one. To get two hosts + * exchanging data, one of them need to open a server socket on which it can listen for incoming messages + * and the other one must connect a client socket onto the server one. + * + * If you need an example of this, check \ref GRAS_ex_ping. + * */ - -/** \name Socket creation functions + +/** \defgroup GRAS_sock_create Socket creation functions * \ingroup GRAS_sock + * + *
Top [\ref index]::[\ref GRAS_API]::[\ref GRAS_sock] + *
Prev + *
Next [\ref GRAS_sock_info]
*/ /* @{*/ /** \brief Opaque type describing a socket */ @@ -39,9 +55,13 @@ gras_socket_t gras_socket_server_ext(unsigned short port, unsigned long int bufSize, int measurement); /* @}*/ -/** \name Retrieving data about sockets and peers +/** \defgroup GRAS_sock_info Retrieving data about sockets and peers * \ingroup GRAS_sock * + *
Top [\ref index]::[\ref GRAS_API]::[\ref GRAS_sock] + *
Prev [\ref GRAS_sock_create] + *
Next [\ref GRAS_sock_meas]
+ * * Who are you talking to? */ /* @{*/ @@ -54,9 +74,13 @@ int gras_socket_peer_port(gras_socket_t sock); char *gras_socket_peer_name(gras_socket_t sock); /* @}*/ -/** \name Using measurement sockets +/** \defgroup GRAS_sock_meas Using measurement sockets * \ingroup GRAS_sock * + *
Top [\ref index]::[\ref GRAS_API]::[\ref GRAS_sock] + *
Prev [\ref GRAS_sock_info] + *
Next [\ref GRAS_sock_file]
+ * * You may want to use sockets not to exchange valuable data (in messages), * but to conduct some bandwidth measurements and related experiments. If so, try those measurement sockets. * @@ -80,9 +104,13 @@ gras_socket_t gras_socket_meas_accept(gras_socket_t peer); /* @}*/ -/** \name Using files as sockets +/** \defgroup GRAS_sock_file Using files as sockets * \ingroup GRAS_sock * + *
Top [\ref index]::[\ref GRAS_API]::[\ref GRAS_sock] + *
Prev [\ref GRAS_sock_meas] + *
Next
+ * * For debugging purpose, it is possible to deal with files as if they were sockets. * It can even be useful to store stuff in a portable manner, but writing messages to a file * may be strange...