summaryrefslogtreecommitdiff
path: root/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp
diff options
context:
space:
mode:
authornobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-07 16:30:11 +0000
committernobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2000-03-07 16:30:11 +0000
commita980eaccb9f0338f262549f31cc99a23529efd73 (patch)
tree726d1a64fda6757c5c37b41a489af40bcfa7505c /examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp
parentdcd83bbd125e03d0659576ba51831a7350e3fd49 (diff)
downloadATCD-a980eaccb9f0338f262549f31cc99a23529efd73.tar.gz
This commit was manufactured by cvs2svn to create tag 'TAO-1_0_15'.TAO-1_0_15
Diffstat (limited to 'examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp')
-rw-r--r--examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp56
1 files changed, 0 insertions, 56 deletions
diff --git a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp b/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp
deleted file mode 100644
index b55f437127e..00000000000
--- a/examples/IPC_SAP/SOCK_SAP/FD-unclient.cpp
+++ /dev/null
@@ -1,56 +0,0 @@
-// $Id$
-
-#include "ace/LSOCK_Connector.h"
-#include "ace/UNIX_Addr.h"
-
-ACE_RCSID(SOCK_SAP, FD_unclient, "$Id$")
-
-#if defined (ACE_HAS_MSG) && !defined (ACE_LACKS_UNIX_DOMAIN_SOCKETS)
-// ACE_LSOCK Client.
-
-int
-main (int argc, char *argv[])
-{
- const char *file_name = argc > 1 ? argv[1] : "./local_data";
- const char *rendezvous = argc > 2 ? argv[2] : ACE_DEFAULT_RENDEZVOUS;
-
- ACE_LSOCK_Stream cli_stream;
- ACE_UNIX_Addr addr (rendezvous);
-
- // Establish the connection with server.
- ACE_LSOCK_Connector connector;
-
- if (connector.connect (cli_stream, addr) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p", "connect"), -1);
-
- ACE_HANDLE handle = ACE_OS::open (file_name, O_RDONLY);
-
- if (handle == ACE_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR, "%p", "open"), -1);
-
- // Send handle to server (correctly handles incomplete writes).
- if (cli_stream.send_handle (handle) == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p", "send"), -1);
-
- char buf[BUFSIZ];
- ssize_t n = cli_stream.recv (buf, sizeof buf);
-
- if (n == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p", "recv"), -1);
- else if (n == 0)
- ACE_DEBUG ((LM_DEBUG, "server shutdown (bug in kernel?)\n"));
- else
- ACE_DEBUG ((LM_DEBUG, "server %*s shutdown\n", n, buf));
-
- // Explicitly close the connection.
- if (cli_stream.close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR, "%p", "close"), -1);
-
- return 0;
-}
-#else
-int main (int, char *[])
-{
- ACE_ERROR_RETURN ((LM_ERROR, "your platform must support sendmsg/recvmsg to run this test\n"), -1);
-}
-#endif /* ACE_HAS_MSG */