summaryrefslogtreecommitdiff
path: root/examples/IPC_SAP/SPIPE_SAP
diff options
context:
space:
mode:
Diffstat (limited to 'examples/IPC_SAP/SPIPE_SAP')
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/Makefile276
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/NPClient.cpp58
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/NPServer.cpp66
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/client.cpp44
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp54
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp51
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp59
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/producer_read.cpp50
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/server.cpp120
-rw-r--r--examples/IPC_SAP/SPIPE_SAP/shared.h10
10 files changed, 0 insertions, 788 deletions
diff --git a/examples/IPC_SAP/SPIPE_SAP/Makefile b/examples/IPC_SAP/SPIPE_SAP/Makefile
deleted file mode 100644
index f1b867cae90..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/Makefile
+++ /dev/null
@@ -1,276 +0,0 @@
-#----------------------------------------------------------------------------
-# $Id$
-#
-# Makefile for the simple STREAM pipe client/server test file
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Local macros
-#----------------------------------------------------------------------------
-
-BIN = client \
- server \
- consumer_msg \
- consumer_read \
- producer_msg \
- producer_read \
- NPClient \
- NPServer
-
-LSRC = $(addsuffix .cpp,$(BIN))
-
-VLDLIBS = $(LDLIBS:%=%$(VAR))
-
-BUILD = $(VBIN)
-
-#----------------------------------------------------------------------------
-# Include macros and targets
-#----------------------------------------------------------------------------
-
-include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
-include $(ACE_ROOT)/include/makeinclude/macros.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
-include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
-
-#----------------------------------------------------------------------------
-# Local targets
-#----------------------------------------------------------------------------
-
-#----------------------------------------------------------------------------
-# Dependencies
-#----------------------------------------------------------------------------
-# DO NOT DELETE THIS LINE -- g++dep uses it.
-# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
-
-.obj/client.o .obj/client.so .shobj/client.o .shobj/client.so: client.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-.obj/server.o .obj/server.so .shobj/server.o .shobj/server.so: server.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-.obj/consumer_msg.o .obj/consumer_msg.so .shobj/consumer_msg.o .shobj/consumer_msg.so: consumer_msg.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-.obj/consumer_read.o .obj/consumer_read.so .shobj/consumer_read.o .shobj/consumer_read.so: consumer_read.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-.obj/producer_msg.o .obj/producer_msg.so .shobj/producer_msg.o .shobj/producer_msg.so: producer_msg.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-.obj/producer_read.o .obj/producer_read.so .shobj/producer_read.o .shobj/producer_read.so: producer_read.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-.obj/NPClient.o .obj/NPClient.so .shobj/NPClient.o .shobj/NPClient.so: NPClient.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Connector.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i \
- $(ACE_ROOT)/ace/SPIPE_Connector.i
-.obj/NPServer.o .obj/NPServer.so .shobj/NPServer.o .shobj/NPServer.so: NPServer.cpp \
- $(ACE_ROOT)/ace/SPIPE_Addr.h \
- $(ACE_ROOT)/ace/Addr.h \
- $(ACE_ROOT)/ace/ACE.h \
- $(ACE_ROOT)/ace/OS.h \
- $(ACE_ROOT)/ace/inc_user_config.h \
- $(ACE_ROOT)/ace/streams.h \
- $(ACE_ROOT)/ace/Basic_Types.h \
- $(ACE_ROOT)/ace/Basic_Types.i \
- $(ACE_ROOT)/ace/Trace.h \
- $(ACE_ROOT)/ace/OS.i \
- $(ACE_ROOT)/ace/Log_Msg.h \
- $(ACE_ROOT)/ace/Log_Record.h \
- $(ACE_ROOT)/ace/ACE.i \
- $(ACE_ROOT)/ace/Log_Priority.h \
- $(ACE_ROOT)/ace/Log_Record.i \
- $(ACE_ROOT)/ace/Addr.i \
- $(ACE_ROOT)/ace/SPIPE_Addr.i \
- $(ACE_ROOT)/ace/SString.h \
- $(ACE_ROOT)/ace/SString.i \
- $(ACE_ROOT)/ace/Malloc_Base.h \
- $(ACE_ROOT)/ace/SPIPE_Acceptor.h \
- $(ACE_ROOT)/ace/SPIPE_Stream.h \
- $(ACE_ROOT)/ace/SPIPE.h \
- $(ACE_ROOT)/ace/IPC_SAP.h \
- $(ACE_ROOT)/ace/IPC_SAP.i \
- $(ACE_ROOT)/ace/SPIPE.i \
- $(ACE_ROOT)/ace/SPIPE_Stream.i
-
-# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp b/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp
deleted file mode 100644
index ccc9e055618..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/NPClient.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Connector.h"
-
-ACE_RCSID(SPIPE_SAP, NPClient, "$Id$")
-
-#if defined (ACE_WIN32)
-#define MAKE_PIPE_NAME(X) \\\\.\\pipe\\#X
-#else
-#define MAKE_PIPE_NAME(X) X
-#endif
-
-const int DEFAULT_SIZE = 8;
-const int DEFAULT_COUNT = 10000;
-
-int
-main (int argc, char *argv[])
-{
- int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE;
- int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT;
- char *buf;
-
- ACE_NEW_RETURN (buf,
- char[size],
- 1);
-
- const char *pipe_name = "acepipe";
- const char *rendezvous = MAKE_PIPE_NAME (pipe_name);
-
- ACE_SPIPE_Stream cli_stream;
- ACE_SPIPE_Connector con;
- int i;
-
- if (con.connect (cli_stream,
- ACE_SPIPE_Addr (rendezvous)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- rendezvous),
- -1);
-
- ACE_OS::strcpy (buf, "hello");
- size = ACE_OS::strlen (buf) + 1;
-
- for (i = 0; i < iterations; i++)
- if (cli_stream.send (buf, size) != size)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "putmsg"),
- -1);
-
- if (cli_stream.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "close"),
- -1);
- return 0;
-}
diff --git a/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp b/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp
deleted file mode 100644
index e23e21c53b3..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/NPServer.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Acceptor.h"
-
-ACE_RCSID(SPIPE_SAP, NPServer, "$Id$")
-
-#if defined (ACE_WIN32)
-#define MAKE_PIPE_NAME(X) \\\\.\\pipe\\#X
-#else
-#define MAKE_PIPE_NAME(X) X
-#endif
-
-int
-main (int /* argc */, char * /* argv */ [])
-{
- ACE_SPIPE_Acceptor acceptor;
- ACE_SPIPE_Stream new_stream;
- char buf[BUFSIZ];
- int n;
- const char *pipe_name = "acepipe";
- const char *rendezvous = MAKE_PIPE_NAME (pipe_name);
-
- // Initialize named pipe listener.
-
- if (acceptor.open (ACE_SPIPE_Addr (rendezvous)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
-
- "open"), 1);
-
- for (;;)
- {
- ACE_DEBUG ((LM_DEBUG,
- "waiting for connection\n"));
-
- // Accept a client connection.
- if (acceptor.accept (new_stream, 0) == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- "%p\n",
- "accept"),
- 1);
-
- ACE_DEBUG ((LM_DEBUG,
- "Accepted connection\n"));
-
- while ((n = new_stream.recv (buf, sizeof buf)) > 0)
- {
- ACE_OS::fprintf (stderr,
- "%s\n",
- buf);
- ACE_OS::write (ACE_STDOUT,
- buf,
- n);
- }
-
- if (n == -1)
- {
- ACE_DEBUG ((LM_DEBUG,
- "End of connection. Closing handle\n"));
- new_stream.close ();
- }
- }
-
- ACE_NOTREACHED(return 0);
-}
diff --git a/examples/IPC_SAP/SPIPE_SAP/client.cpp b/examples/IPC_SAP/SPIPE_SAP/client.cpp
deleted file mode 100644
index 2a8b43e8860..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/client.cpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Connector.h"
-
-ACE_RCSID(SPIPE_SAP, client, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-int
-main (int argc, char *argv[])
-{
- if (argc < 2)
- ACE_ERROR_RETURN ((LM_ERROR, "usage: %s string [rendezvous]\n", argv[0]), 1);
-
- if (argc > 2)
- rendezvous = argv[2];
-
- ACE_SPIPE_Stream cli_stream;
- ACE_SPIPE_Connector con;
-
- if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), 1);
-
- ssize_t len = ACE_OS::strlen (argv[1]) + 1;
-
- if (cli_stream.send (argv[1], len) != len)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1);
-
- if (cli_stream.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1);
-
- return 0;
-}
-#else
-#include <stdio.h>
-int main (int, char *[])
-{
- ACE_OS::fprintf (stderr, "This feature is not supported\n");
- return 0;
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp
deleted file mode 100644
index 7c65ac672eb..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/consumer_msg.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Acceptor.h"
-
-ACE_RCSID(SPIPE_SAP, consumer_msg, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-int
-main (int argc, char *argv[])
-{
- ACE_SPIPE_Acceptor peer_acceptor;
- ACE_SPIPE_Stream new_stream;
- char buf[BUFSIZ];
- ACE_Str_Buf buffer (buf, 0, sizeof buf);
- int flags = 0;
-
- if (argc > 1)
- rendezvous = argv[1];
-
- ACE_OS::unlink (rendezvous);
- ACE_OS::fdetach (rendezvous);
-
- ACE_SPIPE_Addr addr (rendezvous);
- ACE_Time_Value timeout (ACE_DEFAULT_TIMEOUT);
-
- if (peer_acceptor.open (addr) == -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 (new_stream.recv ((ACE_Str_Buf *) 0, &buffer, &flags) >= 0)
- if (buffer.len == 0)
- break;
- else
- ACE_OS::write (ACE_STDOUT, buffer.buf, buffer.len);
- return 0;
-}
-#else
-#include <stdio.h>
-int main (int, char *[])
-{
- ACE_OS::fprintf (stderr, "This feature is not supported\n");
- return 0;
-}
-#endif /* ACE_HAS_STREAM_PIPES */
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 7b45cbdb3ba..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/consumer_read.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Acceptor.h"
-
-ACE_RCSID(SPIPE_SAP, consumer_read, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-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 (int, char *[])
-{
- ACE_OS::fprintf (stderr, "This feature is not supported\n");
- return 0;
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp
deleted file mode 100644
index 5f52e3159db..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/producer_msg.cpp
+++ /dev/null
@@ -1,59 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Connector.h"
-
-ACE_RCSID(SPIPE_SAP, producer_msg, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-const int DEFAULT_SIZE = 4 * 1024;
-const int DEFAULT_COUNT = 100;
-
-int
-main (int argc, char *argv[])
-{
- int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE;
- int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT;
- char *buf;
-
- ACE_NEW_RETURN (buf, char[size], -1);
-
- if (argc > 3)
- rendezvous = argv[3];
-
- ACE_SPIPE_Stream cli_stream;
- ACE_SPIPE_Connector con;
- int i;
-
- if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), 1);
-
- for (i = 0; i < size; i++)
- buf[i] = 'a';
-
- ACE_Str_Buf buffer (buf, size);
-
- for (i = 0; i < iterations; i++)
- if (cli_stream.send ((ACE_Str_Buf *) 0,
- &buffer,
- 1,
- MSG_BAND) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "send"), 1);
-
- if (cli_stream.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), 1);
-
- delete buf;
- return 0;
-}
-#else
-#include <stdio.h>
-int main (int, char *[])
-{
- ACE_OS::fprintf (stderr, "This feature is not supported\n");
- return 0;
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp b/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp
deleted file mode 100644
index a43e50734a3..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/producer_read.cpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Connector.h"
-
-ACE_RCSID(SPIPE_SAP, producer_read, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-const int DEFAULT_SIZE = 8 * 1024;
-const int DEFAULT_COUNT = 100;
-
-int
-main (int argc, char *argv[])
-{
- int size = argc > 1 ? atoi (argv[1]) : DEFAULT_SIZE;
- int iterations = argc > 2 ? atoi (argv[2]) : DEFAULT_COUNT;
- char *buf = new char[size];
-
- if (argc > 3)
- rendezvous = argv[3];
-
- ACE_SPIPE_Stream cli_stream;
- ACE_SPIPE_Connector con;
- int i;
-
- if (con.connect (cli_stream, ACE_SPIPE_Addr (rendezvous)) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", rendezvous), -1);
-
- for (i = 0; i < size; i++)
- buf[i] = 'a';
-
- for (i = 0; i < iterations; i++)
- if (cli_stream.send (buf, size) != size)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "putmsg"), -1);
-
- if (cli_stream.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "close"), -1);
-
- return 0;
-}
-#else
-#include <stdio.h>
-int main (int, char *[])
-{
- ACE_ERROR_RETURN ((LM_ERROR, "this feature is not supported"), -1);
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/IPC_SAP/SPIPE_SAP/server.cpp b/examples/IPC_SAP/SPIPE_SAP/server.cpp
deleted file mode 100644
index 9313a4d99cb..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/server.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-// $Id$
-
-#include "ace/SPIPE_Addr.h"
-#include "ace/SPIPE_Acceptor.h"
-
-ACE_RCSID(SPIPE_SAP, server, "$Id$")
-
-#if defined (ACE_HAS_STREAM_PIPES)
-
-#include "shared.h"
-
-// Maximum per-process open I/O descriptors.
-const int MAX_HANDLES = 200;
-const int PERMS = 0666;
-
-int
-main (int argc, char *argv[])
-{
- ACE_SPIPE_Acceptor peer_acceptor;
- ACE_SPIPE_Stream new_stream;
- struct pollfd poll_array[MAX_HANDLES];
- ACE_HANDLE handle;
-
- for (handle = 0; handle < MAX_HANDLES; handle++)
- {
- poll_array[handle].fd = -1;
- poll_array[handle].events = POLLIN;
- }
-
- if (argc > 1)
- rendezvous = argv[1];
-
- ACE_OS::fdetach (rendezvous);
- ACE_SPIPE_Addr addr (rendezvous);
-
- ACE_HANDLE s_handle = peer_acceptor.open (addr);
-
- if (s_handle == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "peer_acceptor.open"), -1);
-
- poll_array[0].fd = s_handle;
-
- for (int width = 1;;)
- {
- // Block waiting for client I/O events (handle interrupts).
- while (ACE_OS::poll (poll_array, width) == -1 && errno == EINTR)
- continue;
-
- // Handle pending logging messages first (s_handle + 1 is
- // guaranteed to be lowest client descriptor).
-
- for (handle = s_handle + 1; handle < width; handle++)
- if (ACE_BIT_ENABLED (poll_array[handle].revents, POLLIN)
- || ACE_BIT_ENABLED (poll_array[handle].revents, POLLHUP))
- {
- char buf[BUFSIZ];
- ssize_t n = ACE_OS::read (handle, buf, sizeof buf);
-
- // recv will not block in this case!
- if (n == -1)
- ACE_DEBUG ((LM_DEBUG, "%p\n", "read failed"));
- else if (n == 0)
- {
- // Handle client connection shutdown.
- if (ACE_OS::close (poll_array[handle].fd) == -1)
- ACE_DEBUG ((LM_DEBUG, "%p\n", "close"));
- poll_array[handle].fd = -1;
-
- if (handle + 1 == width)
- {
- while (poll_array[handle].fd == -1)
- handle--;
- width = handle + 1;
- }
- }
- else
- ACE_DEBUG ((LM_DEBUG, "%*s\n", n, buf));
- }
-
- if (ACE_BIT_ENABLED (poll_array[0].revents, POLLIN))
- {
- if (peer_acceptor.accept (new_stream) == -1)
- ACE_DEBUG ((LM_DEBUG, "%p\n", "accept failed"));
-
- ACE_SPIPE_Addr client;
- ACE_HANDLE n_handle = new_stream.get_handle ();
-
- if (new_stream.get_remote_addr (client) == -1)
- ACE_DEBUG ((LM_DEBUG, "%p\n",
- "get_remote_addr failed"));
-
- ACE_DEBUG ((LM_DEBUG,
- "n_handle = %d, uid = %d, gid = %d\n",
- n_handle,
- client.user_id (),
- client.group_id ()));
-
- int arg = RMSGN | RPROTDAT;
-
- if (ACE_OS::ioctl (n_handle,
- I_SRDOPT, (void *) arg) == -1)
- ACE_DEBUG ((LM_DEBUG, "%p\n", "ioctl failed"));
-
- poll_array[n_handle].fd = n_handle;
-
- if (n_handle >= width)
- width = n_handle + 1;
- }
- }
-
- return 0;
-}
-#else
-#include <stdio.h>
-int main (int, char *[])
-{
- ACE_OS::fprintf (stderr, "This feature is not supported\n");
- return 0;
-}
-#endif /* ACE_HAS_STREAM_PIPES */
diff --git a/examples/IPC_SAP/SPIPE_SAP/shared.h b/examples/IPC_SAP/SPIPE_SAP/shared.h
deleted file mode 100644
index 3d49ce9dc04..00000000000
--- a/examples/IPC_SAP/SPIPE_SAP/shared.h
+++ /dev/null
@@ -1,10 +0,0 @@
-/* -*- C++ -*- */
-// $Id$
-
-#include "ace/OS.h"
-
-#if !defined (ACE_LACKS_PRAGMA_ONCE)
-# pragma once
-#endif /* ACE_LACKS_PRAGMA_ONCE */
-
-static const char *rendezvous = ACE_DEFAULT_RENDEZVOUS;