1 #include "ace/OS_main.h"
2 #include "ace/SPIPE_Addr.h"
3 #include "ace/SPIPE_Connector.h"
4 #include "ace/Log_Msg.h"
5 #include "ace/OS_NS_stdio.h"
6 #include "ace/OS_NS_string.h"
9 #if defined (ACE_HAS_STREAM_PIPES)
14 ACE_TMAIN (int argc
, ACE_TCHAR
*argv
[])
17 ACE_ERROR_RETURN ((LM_ERROR
, "usage: %s string [rendezvous]\n", argv
[0]), 1);
22 ACE_SPIPE_Stream cli_stream
;
23 ACE_SPIPE_Connector con
;
25 if (con
.connect (cli_stream
, ACE_SPIPE_Addr (rendezvous
)) == -1)
26 ACE_ERROR_RETURN ((LM_ERROR
, "%p\n", rendezvous
), 1);
28 ssize_t len
= ACE_OS::strlen (argv
[1]) + 1;
30 if (cli_stream
.send (argv
[1], len
) != len
)
31 ACE_ERROR_RETURN ((LM_ERROR
, "%p\n", "send"), 1);
33 if (cli_stream
.close () == -1)
34 ACE_ERROR_RETURN ((LM_ERROR
, "%p\n", "close"), 1);
40 int ACE_TMAIN (int, ACE_TCHAR
*[])
42 ACE_OS::fprintf (stderr
, "This feature is not supported\n");
45 #endif /* ACE_HAS_STREAM_PIPES */