diff options
| author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-30 06:50:29 +0000 |
|---|---|---|
| committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1996-12-30 06:50:29 +0000 |
| commit | a4a7690c336d4c8a16b3041c86d501ba38226e96 (patch) | |
| tree | 9e9f93a98edd2591453f092d178ad29a1c5fb519 /examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp | |
| parent | a5c4d8047ab58df5c45092e18ae503ad40518f0e (diff) | |
| download | ATCD-unlabeled-4.1.2.tar.gz | |
This commit was manufactured by cvs2svn to create branchunlabeled-4.1.2
'unlabeled-4.1.2'.
Diffstat (limited to 'examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp')
| -rw-r--r-- | examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp deleted file mode 100644 index d6ca116b5db..00000000000 --- a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp +++ /dev/null @@ -1,50 +0,0 @@ - -// $Id$ - -#include "ace/SPIPE_Addr.h" -#include "ace/SPIPE_Acceptor.h" -#include "ace/Time_Value.h" -#include "shared.h" - -#if defined (ACE_HAS_STREAM_PIPES) - -int -main (int argc, char *argv[]) -{ - ACE_SPIPE_Acceptor peer_acceptor; - ACE_SPIPE_Stream new_stream; - char buf[BUFSIZ]; - int n; - - // Wait up to ACE_DEFAULT_TIMEOUT seconds to accept connection. - ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT); - - if (argc > 1) - rendezvous = argv[1]; - - ACE_OS::unlink (rendezvous); - ACE_OS::fdetach (rendezvous); - - if (peer_acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "open"), 1); - - ACE_DEBUG ((LM_DEBUG, "waiting for connection\n")); - - if (peer_acceptor.accept (new_stream, 0, &timeout) == -1) - ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "accept"), 1); - - ACE_DEBUG ((LM_DEBUG, "accepted\n")); - - while ((n = new_stream.recv (buf, sizeof buf)) > 0) - ACE_OS::write (ACE_STDOUT, buf, n); - - return 0; -} -#else -#include <stdio.h> -int main (void) -{ - ACE_OS::fprintf (stderr, "This feature is not supported\n"); - return 0; -} -#endif /* ACE_HAS_STREAM_PIPES */ |
