1 #include "ace/OS_main.h"
2 #include "ace/Naming_Context.h"
3 #include "ace/Log_Msg.h"
4 #include "ace/OS_NS_stdio.h"
5 #include "ace/OS_NS_unistd.h"
7 int ACE_TMAIN (int, ACE_TCHAR
*[])
11 ACE_STATIC_SVC_REGISTER(ACE_Naming_Context
);
13 ACE_Naming_Context
*ns_ptr
;
14 ACE_NEW_RETURN (ns_ptr
,
17 ACE_Name_Options
*name_options
=
18 ns_ptr
->name_options ();
20 const ACE_TCHAR
*m_argv
[] =
23 ACE_TEXT("-cNODE_LOCAL"),
27 int m_argc
= sizeof (m_argv
) / sizeof (ACE_TCHAR
*) -1;
29 name_options
->parse_args (m_argc
,
30 (ACE_TCHAR
**) m_argv
);
31 i
= ns_ptr
->open (ACE_Naming_Context::NODE_LOCAL
);
33 "(%P) opened with %d\n",
48 for (int l
= 1; l
<= 1000 ; l
++)
52 (int) ACE_OS::getpid (),
57 i
= ns_ptr
->bind (key
,
61 "%d: bind of %s: %d\n",