1 #include "ace/FIFO_Send.h"
2 #include "ace/Log_Msg.h"
3 #include "ace/Truncate.h"
4 #include "ace/OS_NS_string.h"
5 #include "ace/OS_NS_stdio.h"
6 #include "ace/OS_main.h"
10 ACE_TMAIN (int, ACE_TCHAR
*[])
12 ACE_FIFO_Send
client (ACE_DEFAULT_RENDEZVOUS
);
13 ACE_TCHAR buf
[BUFSIZ
];
15 while (ACE_OS::fgets (buf
, sizeof buf
, stdin
) != 0)
17 ssize_t n
= ACE_Utils::truncate_cast
<ssize_t
> (ACE_OS::strlen (buf
));
19 if (client
.send (buf
, n
) != n
)
20 ACE_ERROR_RETURN ((LM_ERROR
, "%p\n", "send"), 1);
23 if (client
.close () == -1)
24 ACE_ERROR_RETURN ((LM_ERROR
, "%p\n", "close"), 1);