A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Don't use reserved keywords.
[simgrid.git]
/
examples
/
gras
/
ping
/
ping_client.c
diff --git
a/examples/gras/ping/ping_client.c
b/examples/gras/ping/ping_client.c
index
d9aab2c
..
c60456d
100644
(file)
--- a/
examples/gras/ping/ping_client.c
+++ b/
examples/gras/ping/ping_client.c
@@
-9,9
+9,9
@@
#include "ping.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(Ping);
#include "ping.h"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(Ping);
-static
gras
_socket_t try_gras_socket_client(const char *host, int port)
+static
xbt
_socket_t try_gras_socket_client(const char *host, int port)
{
{
- volatile
gras
_socket_t sock = NULL;
+ volatile
xbt
_socket_t sock = NULL;
xbt_ex_t e;
TRY {
sock = gras_socket_client(host, port);
xbt_ex_t e;
TRY {
sock = gras_socket_client(host, port);
@@
-27,9
+27,9
@@
static gras_socket_t try_gras_socket_client(const char *host, int port)
int client(int argc, char *argv[])
{
int client(int argc, char *argv[])
{
-
gras
_socket_t toserver = NULL; /* peer */
+
xbt
_socket_t toserver = NULL; /* peer */
-
gras
_socket_t from;
+
xbt
_socket_t from;
int ping, pong;
const char *host = "127.0.0.1";
int ping, pong;
const char *host = "127.0.0.1";
@@
-58,7
+58,7
@@
int client(int argc, char *argv[])
/* 5. Keep the user informed of what's going on */
XBT_INFO(">>>>>>>> Connected to server which is on %s:%d <<<<<<<<",
/* 5. Keep the user informed of what's going on */
XBT_INFO(">>>>>>>> Connected to server which is on %s:%d <<<<<<<<",
-
gras_socket_peer_name(toserver), gras
_socket_peer_port(toserver));
+
xbt_socket_peer_name(toserver), xbt
_socket_peer_port(toserver));
/* 6. Prepare and send the ping message to the server */
ping = 1234;
/* 6. Prepare and send the ping message to the server */
ping = 1234;
@@
-70,7
+70,7
@@
int client(int argc, char *argv[])
RETHROWF("Failed to send PING to server: %s");
}
XBT_INFO(">>>>>>>> Message PING(%d) sent to %s:%d <<<<<<<<",
RETHROWF("Failed to send PING to server: %s");
}
XBT_INFO(">>>>>>>> Message PING(%d) sent to %s:%d <<<<<<<<",
- ping,
gras_socket_peer_name(toserver), gras
_socket_peer_port(toserver));
+ ping,
xbt_socket_peer_name(toserver), xbt
_socket_peer_port(toserver));
/* 7. Wait for the answer from the server, and deal with issues */
TRY {
/* 7. Wait for the answer from the server, and deal with issues */
TRY {
@@
-83,7
+83,7
@@
int client(int argc, char *argv[])
/* 8. Keep the user informed of what's going on, again */
XBT_INFO(">>>>>>>> Got PONG(%d) from %s:%d <<<<<<<<",
/* 8. Keep the user informed of what's going on, again */
XBT_INFO(">>>>>>>> Got PONG(%d) from %s:%d <<<<<<<<",
- pong,
gras_socket_peer_name(from), gras
_socket_peer_port(from));
+ pong,
xbt_socket_peer_name(from), xbt
_socket_peer_port(from));
/* 9. Free the allocated resources, and shut GRAS down */
gras_socket_close(toserver);
/* 9. Free the allocated resources, and shut GRAS down */
gras_socket_close(toserver);