1 #include "ace/FIFO_Send_Msg.h"
2 #include "ace/OS_NS_stdio.h"
3 #include "ace/OS_main.h"
4 #include "ace/OS_NS_stdlib.h"
5 #include "ace/OS_NS_time.h"
6 #include "ace/OS_NS_string.h"
9 #if defined (ACE_HAS_STREAM_PIPES)
12 ACE_TMAIN (int, ACE_TCHAR
*[])
14 ACE_FIFO_Send_Msg
client (ACE_DEFAULT_RENDEZVOUS
);
17 ACE_Str_Buf
msg (buf
);
19 ACE_OS::srand (unsigned (ACE_OS::time (0)));
21 while (ACE_OS::fgets (buf
, sizeof buf
, stdin
) != 0)
23 msg
.len
= ACE_OS::strlen (buf
) + 1;
24 if (client
.send (ACE_OS::rand () % 11, &msg
) == -1)
25 ACE_OS::perror ("send");
28 if (client
.close () == -1)
29 ACE_OS::perror ("close"), ACE_OS::exit (1);
34 #include "ace/os_include/os_stdio.h"
35 int ACE_TMAIN (int, ACE_TCHAR
*[])
37 ACE_OS::fprintf (stderr
, "This feature is not supported\n");
40 #endif /* ACE_HAS_STREAM_PIPES */