Changes to attempt to silence bcc64x
[ACE_TAO.git] / ACE / ace / Name_Proxy.h
blob88483796343c10d58bb939a8a46e05241d82f3e0
1 // -*- C++ -*-
3 //=============================================================================
4 /**
5 * @file Name_Proxy.h
7 * Proxy for dealing with remote server process managing NET_LOCAL
8 * Name_Bindings.
10 * @author Gerhard Lenzer
11 * @author Douglas C. Schmidt
12 * @author Prashant Jain
14 //=============================================================================
17 #ifndef ACE_NAME_PROXY_H
18 #define ACE_NAME_PROXY_H
19 #include /**/ "ace/pre.h"
21 #include "ace/INET_Addr.h"
23 #if !defined (ACE_LACKS_PRAGMA_ONCE)
24 # pragma once
25 #endif /* ACE_LACKS_PRAGMA_ONCE */
27 #include "ace/SOCK_Connector.h"
28 #include "ace/SOCK_Stream.h"
29 #include "ace/Service_Config.h"
30 #include "ace/Synch_Options.h"
31 #include "ace/Name_Request_Reply.h"
32 #include "ace/Event_Handler.h"
34 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
36 /**
37 * @class ACE_Name_Proxy
39 * @brief Proxy for dealing with remote server process managing NET_LOCAL
40 * NameBindings.
42 * Shields applications from details of interacting with the
43 * ACE_Name Server.
45 class ACE_Export ACE_Name_Proxy : public ACE_Event_Handler
47 public:
48 /// Default constructor.
49 ACE_Name_Proxy ();
51 // = Establish a binding with the ACE_Name Server.
52 ACE_Name_Proxy (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
53 ACE_Synch_Options& options =
54 ACE_Synch_Options::defaults);
56 int open (const ACE_INET_Addr &remote_addr, // Address of ACE_Name Server.
57 ACE_Synch_Options& options =
58 ACE_Synch_Options::defaults);
60 /// Perform the request and wait for the reply.
61 int request_reply (ACE_Name_Request &request);
63 /// Perform the request.
64 int send_request (ACE_Name_Request &request);
66 /// Receive the reply.
67 int recv_reply (ACE_Name_Request &reply);
69 /// Obtain underlying handle.
70 virtual ACE_HANDLE get_handle () const;
72 /// Close down the connection to the server.
73 virtual ~ACE_Name_Proxy ();
75 /// Dump the state of the object;
76 void dump () const;
78 private:
79 /// ACE_Connector factory used to establish connections actively.
80 ACE_SOCK_Connector connector_;
82 /// Connection to ACE_Name Server peer.
83 ACE_SOCK_Stream peer_;
85 private:
86 ACE_Name_Proxy (const ACE_Name_Proxy &) = delete;
87 ACE_Name_Proxy &operator= (const ACE_Name_Proxy &) = delete;
90 ACE_END_VERSIONED_NAMESPACE_DECL
92 #include /**/ "ace/post.h"
93 #endif /* ACE_NAME_PROXY_H */