diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-18 03:49:11 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-09-18 03:49:11 +0000 |
commit | 176949731eb819366c9dad3a22362b48f007991a (patch) | |
tree | 57f2a3bb2f22fce0b270243aaff226889e6802e6 | |
parent | e7f6baa1919cccacae3c43ad89da1ac11f43800a (diff) | |
download | ATCD-176949731eb819366c9dad3a22362b48f007991a.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-98b | 8 | ||||
-rw-r--r-- | examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp | 7 | ||||
-rw-r--r-- | examples/IPC_SAP/SOCK_SAP/README | 8 |
3 files changed, 20 insertions, 3 deletions
diff --git a/ChangeLog-98b b/ChangeLog-98b index 3c16ce0f4cb..c03e4938e0f 100644 --- a/ChangeLog-98b +++ b/ChangeLog-98b @@ -1,3 +1,11 @@ +Thu Sep 17 22:44:17 1998 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp: If the client + doesn't connect to the server, make sure to shut down the test + gracefully, rather than getting a segfault. Thanks to + Margherita Vittone Wiersma <vittone@fndaub.fnal.gov> for + reporting this. + Thu Sep 17 22:33:00 1998 James CE Johnson <jcej@chiroptera.tragus.org> * docs/tutorials/index.html diff --git a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp index 2c8de27a7fd..d14c97aabf5 100644 --- a/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp +++ b/examples/IPC_SAP/SOCK_SAP/CPP-inclient.cpp @@ -231,7 +231,7 @@ Options::parse_args (int argc, char *argv[]) break; default: ACE_ERROR_RETURN ((LM_ERROR, - "(%P|%t) usage: %n [-2] [-h <host>] [-i iterations] [-m message-size] [-p <port>] [-q <quit string>] [-s] [-t <threads>] [-T <sleep_time>]"), + "(%P|%t) usage: %n [-2] [-h <host>] [-i iterations] [-m message-size] [-p <port>] [-q <quit string>] [-s] [-t <threads>] [-T <sleep_time>]\n"), -1); } @@ -314,6 +314,9 @@ Options::oneway_client_test (void *) // Add 1 to the port to trigger the oneway test! char *request = options->shared_client_test (options->port () + 1, cli_stream); + if (request == 0) + return 0; + // This variable is allocated off the stack to obviate the need for // locking. size_t iteration = 0; @@ -363,6 +366,8 @@ Options::twoway_client_test (void *) char *request = options->shared_client_test (options->port (), cli_stream); + if (request == 0) + return 0; // This variable is allocated off the stack to obviate the need for // locking. diff --git a/examples/IPC_SAP/SOCK_SAP/README b/examples/IPC_SAP/SOCK_SAP/README index 6aa5b10101d..bbe0f20ce5a 100644 --- a/examples/IPC_SAP/SOCK_SAP/README +++ b/examples/IPC_SAP/SOCK_SAP/README @@ -12,11 +12,14 @@ describes each set of tests in more detail: . C-{inclient,inserver}.cpp -- This is basically a C code implementation that opens a connection to the server and sends all the data from the stdin using Internet domain - sockets (i.e., TCP). + sockets (i.e., TCP). . CPP-{inclient,inserver}.cpp -- This test is a more sophisticated C++ wrapper version of the preceeding "C" test using Internet domain sockets (i.e., TCP). + It allows you to test oneway and twoway socket communication + latency and throughput between two processes on the same + machine or on different machines. . CPP-inserver-fancy.cpp -- This program is a more glitzy version of CPP-inserver.cpp that illustrates additional @@ -29,7 +32,8 @@ describes each set of tests in more detail: . CPP-{unclient,unserver}.cpp -- This test is basically a C++ wrapper version of the preceeding "C++" test using - UNIX domain sockets. + UNIX domain sockets. Note that this test only works + between a client and server process on the same machine. . FD-{unclient,inclient}.cpp -- This test illustrates how to pass file descriptors between a client and a |