X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/761318c77783a519dcb81945dd423e2e14c3241b..97ba095764fbd852783e6a6dfe40da2fdd3f1f25:/examples/gras/ping/ping.c diff --git a/examples/gras/ping/ping.c b/examples/gras/ping/ping.c index cdd2271a49..73c4c72b28 100644 --- a/examples/gras/ping/ping.c +++ b/examples/gras/ping/ping.c @@ -11,7 +11,7 @@ XBT_LOG_NEW_DEFAULT_CATEGORY(Ping,"Messages specific to this example"); -/** \brief register messages which may be sent (common to client and server) */ +/* register messages which may be sent (common to client and server) */ static void register_messages(void) { gras_msgtype_declare("ping", gras_datadesc_by_name("int")); gras_msgtype_declare("pong", gras_datadesc_by_name("int")); @@ -119,7 +119,7 @@ int server (int argc,char *argv[]) { /* 8. Sleep one second, but only in real life, not in simulation */ if (!gras_if_RL()) - gras_os_sleep(1, 0); + gras_os_sleep(1); /* 9. Free the allocated resources, and shut GRAS down */ gras_socket_close(globals->sock); @@ -149,7 +149,7 @@ int client(int argc,char *argv[]) { /* 1. Init the GRAS's infrastructure */ gras_init(&argc, argv, NULL); - /* 2. Get the server's address from the command line, if specified */ + /* 2. Get the server's address. The command line override defaults when specified */ if (argc == 3) { host=argv[1]; port=atoi(argv[2]); @@ -158,7 +158,7 @@ int client(int argc,char *argv[]) { INFO2("Launch client (server on %s:%d)",host,port); /* 3. Wait for the server startup */ - gras_os_sleep(1,0); + gras_os_sleep(1); /* 4. Create a socket to speak to the server */ if ((errcode=gras_socket_client(host,port,&toserver))) { @@ -200,7 +200,7 @@ int client(int argc,char *argv[]) { } /* 9. Keep the user informed of what's going on, again */ - INFO3("Client: >>>>>>>> Got PONG(%d) got from %s:%d <<<<<<<<", + INFO3("Client: >>>>>>>> Got PONG(%d) from %s:%d <<<<<<<<", pong, gras_socket_peer_name(from),gras_socket_peer_port(from));