errcode = gras_msg_send(expeditor, gras_msgtype_by_name("pong"), &msg);
if (errcode != no_error) {
errcode = gras_msg_send(expeditor, gras_msgtype_by_name("pong"), &msg);
if (errcode != no_error) {
if ((errcode=gras_socket_server(port,&(g->sock)))) {
CRITICAL1("Error %s encountered while opening the server socket",
if ((errcode=gras_socket_server(port,&(g->sock)))) {
CRITICAL1("Error %s encountered while opening the server socket",
} client_data_t;
/* Function prototypes */
int client (int argc,char *argv[]);
int client(int argc,char *argv[]) {
} client_data_t;
/* Function prototypes */
int client (int argc,char *argv[]);
int client(int argc,char *argv[]) {
if ((errcode=gras_socket_client(host,port,&(g->sock)))) {
ERROR1("Client: Unable to connect to the server. Got %s",
if ((errcode=gras_socket_client(host,port,&(g->sock)))) {
ERROR1("Client: Unable to connect to the server. Got %s",
errcode = gras_msg_send(g->sock, gras_msgtype_by_name("ping"), &ping);
if (errcode != no_error) {
fprintf(stderr, "Client: Unable send PING to server (%s)\n",
errcode = gras_msg_send(g->sock, gras_msgtype_by_name("ping"), &ping);
if (errcode != no_error) {
fprintf(stderr, "Client: Unable send PING to server (%s)\n",
if ((errcode=gras_msg_wait(6000,gras_msgtype_by_name("pong"),
&from,&pong))) {
ERROR1("Client: Why can't I get my PONG message like everyone else (%s)?",
if ((errcode=gras_msg_wait(6000,gras_msgtype_by_name("pong"),
&from,&pong))) {
ERROR1("Client: Why can't I get my PONG message like everyone else (%s)?",