return 1;
}
- INFO0("SERVER: >>>>>>>> Answed with PONG(4321) <<<<<<<<");
+ INFO0("SERVER: >>>>>>>> Answered with PONG(4321) <<<<<<<<");
/* 7. Set the endcondition boolean to true (and make sure the server stops after receiving it). */
globals->endcondition = 1;
/* 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);
/* 1. Init the GRAS's infrastructure */
gras_init(&argc, argv, NULL);
- /* 2. Get the server's address.
- If in simulation, the default is not the same. In any case, the command line override defaults when specified */
- if (gras_if_SG())
- host = "Tremblay";
+ /* 2. Get the server's address. The command line override defaults when specified */
if (argc == 3) {
host=argv[1];
port=atoi(argv[2]);
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))) {
}
/* 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));