X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/58bce89d599a5bee49318c168f54fb407fbf5d24..e88eac1cbcd65de4fed7073b110f3730d4cccf31:/doc/gtut-files/02-simple.c diff --git a/doc/gtut-files/02-simple.c b/doc/gtut-files/02-simple.c index 07ff8d5b25..98ccee74cf 100644 --- a/doc/gtut-files/02-simple.c +++ b/doc/gtut-files/02-simple.c @@ -1,3 +1,4 @@ +#include #include 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(12345); - 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("Jacquelin", 12345); - 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\n"); gras_exit();