Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Use long int for the pids, just to be sure without doublechecking what the size of...
[simgrid.git] / include / gras / transport.h
index 1e7ceac..fbbbd5d 100644 (file)
@@ -1,3 +1,4 @@
+
 /* $Id$ */
 
 /* transport - low level communication (send/receive bunches of bytes)      */
 #define GRAS_TRANSPORT_H
 
 /** \addtogroup GRAS_sock
- *  \brief Socket handling (Communication facility).
+ *  \brief Socket handling
+ *
+ * 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
+ * <i>server</i> socket on which it can listen for incoming messages and the
+ * other one must connect a <i>client</i> socket onto the server one.
+ *
+ * The main difference is that you cannot exchange arbitrary bytes on
+ * sockets, but messages. See the \ref GRAS_msg section for details.
+ * 
+ * If you need an example of how to use sockets, check \ref GRAS_ex_ping.
+ *
  */
-
-/** \name Socket creation functions
+/** \defgroup GRAS_sock_create Socket creation functions
  *  \ingroup GRAS_sock
+ *
  */
 /* @{*/
 /** \brief Opaque type describing a socket */
@@ -39,7 +52,7 @@ 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
  * 
  * Who are you talking to?
@@ -54,7 +67,7 @@ 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
  * 
  * You may want to use sockets not to exchange valuable data (in messages), 
@@ -80,9 +93,10 @@ 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
  * 
+ *
  * 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...