X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/b3f448e0ccc0e5e0195bfba380b1ba3a5c5b10b6..c7576454747b226b96babe1fb769239059f74467:/doc/gtut-tour-02-simple.doc diff --git a/doc/gtut-tour-02-simple.doc b/doc/gtut-tour-02-simple.doc index 3dfba8fd4e..16cfee88a0 100644 --- a/doc/gtut-tour-02-simple.doc +++ b/doc/gtut-tour-02-simple.doc @@ -1,5 +1,5 @@ -/** +/** @page GRAS_tut_tour_simpleexchange Lesson 2: Exchanging simple messages \section GRAS_tut_tour_simpleexchange_toc Table of Contents @@ -7,8 +7,8 @@ - \ref GRAS_tut_tour_simpleexchange_socks - \ref GRAS_tut_tour_simpleexchange_exchange - \ref GRAS_tut_tour_simpleexchange_recaping - -
+ +
\section GRAS_tut_tour_simpleexchange_msgtype Declaring the messages to be exchanged @@ -81,9 +81,8 @@ GRAS offers a plenty of ways to communicate. The simple one is to use \ref gras_msg_send on the sender side, and \ref gras_msg_wait on the receiver side. \ref gras_msg_send expects 3 arguments: the socket on which to send the -message, the message type, and a pointer to the actual content of the -message. The simplest way to retrive a message type from its name is to use -\ref gras_msgtype_by_name. Since we don't have any payload, this becomes: +message, the message type (described by its name), and a pointer to the actual content of the +message. Since we don't have any payload, this becomes: \dontinclude 02-simple.c \skip msg_send @@ -104,12 +103,12 @@ following will do it: \section GRAS_tut_tour_simpleexchange_recaping Recaping everything together Here is the complete code of this example. Note the use of the functions -\ref gras_socket_my_port, \ref gras_socket_peer_name and \ref -gras_socket_peer_port to retrieve information about who you are connected to. +\ref xbt_socket_my_port, \ref xbt_socket_peer_name and \ref +xbt_socket_peer_port to retrieve information about who you are connected to. \include 02-simple.c -Here is the output of the simulator. Note that \ref gras_socket_peer_port +Here is the output of the simulator. Note that \ref xbt_socket_peer_port actually returns the port number of the server of the peer. This may sound a bit strange to BSD experts, but it is actually really useful: you can store this value, and contact your peer afterward passing this number to