Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Regenerate the output captures of the gras tutorial after the numerous timing changes...
[simgrid.git] / doc / gtut-files / 03-args.c
index e4875ac..ef6a61f 100644 (file)
@@ -1,3 +1,4 @@
+#include <stdio.h>
 #include <gras.h>
 
 int server(int argc, char *argv[]) {
@@ -9,7 +10,7 @@ int server(int argc, char *argv[]) {
   gras_msgtype_declare("hello", NULL);
   mysock = gras_socket_server(atoi(argv[1]));
 
-  gras_msg_wait(60, gras_msgtype_by_name("hello"), &toclient, NULL /* no payload */);
+  gras_msg_wait(60, "hello", &toclient, NULL /* no payload */);
   
   fprintf(stderr,"Cool, we received the message from %s:%d.\n",
          gras_socket_peer_name(toclient), gras_socket_peer_port(toclient));
@@ -31,7 +32,7 @@ int client(int argc, char *argv[]) {
   gras_os_sleep(1.5); /* sleep 1 second and half */
   toserver = gras_socket_client(argv[1], atoi(argv[2]));
   
-  gras_msg_send(toserver,gras_msgtype_by_name("hello"), NULL);
+  gras_msg_send(toserver,"hello", NULL);
   fprintf(stderr,"That's it, we sent the data to the server on %s\n", gras_socket_peer_name(toserver));
 
   gras_exit();