diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-05 21:11:48 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1998-05-05 21:11:48 +0000 |
commit | 9f19377c37c6d69fa0c4dd9f208a6dd402c1bf2b (patch) | |
tree | 0ccadae8cda53e94e9aef20ae03407d9253bcd46 | |
parent | a5d364e632e21cd2daa8c43d905dfd94341448c7 (diff) | |
download | ATCD-9f19377c37c6d69fa0c4dd9f208a6dd402c1bf2b.tar.gz |
*** empty log message ***
-rw-r--r-- | TAO/ChangeLog-98c | 12 | ||||
-rw-r--r-- | TAO/tao/Connect.cpp | 4 | ||||
-rw-r--r-- | TAO/tao/Connect.h | 4 | ||||
-rw-r--r-- | TAO/tao/GIOP.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/GIOP.h | 2 | ||||
-rw-r--r-- | TAO/tao/ORB.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.cpp | 16 | ||||
-rw-r--r-- | TAO/tao/ORB_Core.h | 4 | ||||
-rw-r--r-- | TAO/tao/Server_Strategy_Factory.cpp | 8 | ||||
-rw-r--r-- | TAO/tao/Server_Strategy_Factory.h | 2 | ||||
-rw-r--r-- | TAO/tao/corba.h | 6 | ||||
-rw-r--r-- | TAO/tao/orbconf.h | 16 |
12 files changed, 59 insertions, 31 deletions
diff --git a/TAO/ChangeLog-98c b/TAO/ChangeLog-98c index 851408babe4..a85bb850f11 100644 --- a/TAO/ChangeLog-98c +++ b/TAO/ChangeLog-98c @@ -1,3 +1,15 @@ +Tue May 5 15:40:09 1998 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> + + * tao/orbconf.h: Added macros for + TAO_SOCK_{STREAM,ACCEPTOR,CONNECTOR}, which can be overridden in + an ACE config.h file to select a different set of transport + APIs. + + * tao/{ORB_Core,GIOP,Server_Strategy_Factory,ORB}.{h,cpp}: Changed + all uses of ACE_SOCK_* to TAO_SOCK_* so we can override this to + use a different transport API without changing the code at + compile time. + Mon May 4 11:57:34 1998 Carlos O'Ryan <coryan@cs.wustl.edu> * orbsvcs/tests/EC_Multiple/EC_Multiple.h: diff --git a/TAO/tao/Connect.cpp b/TAO/tao/Connect.cpp index cdcfa231155..dfd1024f90d 100644 --- a/TAO/tao/Connect.cpp +++ b/TAO/tao/Connect.cpp @@ -645,7 +645,7 @@ TAO_Client_Connection_Handler::handle_close (ACE_HANDLE handle, #define TAO_SVC_TUPLE ACE_Svc_Tuple<TAO_Client_Connection_Handler> #define TAO_HASH_ADDR ACE_Hash_Addr<ACE_INET_Addr> #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) -template class ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH>; +template class ACE_Svc_Handler<TAO_SOCK_STREAM, ACE_NULL_SYNCH>; template class TAO_HASH_ADDR; template class TAO_SVC_TUPLE; template class ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>; @@ -654,7 +654,7 @@ template class ACE_Map_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>; template class ACE_Map_Reverse_Iterator<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX>; template class ACE_Map_Entry<int, TAO_SVC_TUPLE*>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) -#pragma instantiate ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +#pragma instantiate ACE_Svc_Handler<TAO_SOCK_STREAM, ACE_NULL_SYNCH> #pragma instantiate TAO_HASH_ADDR #pragma instantiate TAO_SVC_TUPLE #pragma instantiate ACE_Map_Manager<int, TAO_SVC_TUPLE*, ACE_SYNCH_RW_MUTEX> diff --git a/TAO/tao/Connect.h b/TAO/tao/Connect.h index efd1a5e8418..3c3eaf84201 100644 --- a/TAO/tao/Connect.h +++ b/TAO/tao/Connect.h @@ -27,7 +27,7 @@ class TAO_OA_Parameters; class TAO_GIOP_RequestHeader; -typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +typedef ACE_Svc_Handler<TAO_SOCK_STREAM, ACE_NULL_SYNCH> TAO_SVC_HANDLER; class TAO_Client_Connection_Handler : public TAO_SVC_HANDLER @@ -163,7 +163,7 @@ protected: #endif /* __ACE_INLINE__ */ typedef ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, - ACE_SOCK_ACCEPTOR> + TAO_SOCK_ACCEPTOR> TAO_ACCEPTOR; #endif /* TAO_CONNECT_H */ diff --git a/TAO/tao/GIOP.cpp b/TAO/tao/GIOP.cpp index 5ecf9979d7f..79e91c99b94 100644 --- a/TAO/tao/GIOP.cpp +++ b/TAO/tao/GIOP.cpp @@ -114,7 +114,7 @@ TAO_GIOP::send_request (TAO_SVC_HANDLER *handler, ACE_reinterpret_cast (u_char *, buf), buflen); - ACE_SOCK_Stream &peer = handler->peer (); + TAO_SOCK_Stream &peer = handler->peer (); while (buflen > 0) { @@ -262,7 +262,7 @@ TAO_GIOP::send_error (TAO_Client_Connection_Handler *&handler) } ssize_t -TAO_GIOP::read_buffer (ACE_SOCK_Stream &peer, +TAO_GIOP::read_buffer (TAO_SOCK_Stream &peer, char *buf, size_t len) { @@ -308,7 +308,7 @@ TAO_GIOP::recv_request (TAO_SVC_HANDLER *&handler, ACE_TIMEPROBE (" -> GIOP::recv_request - start"); TAO_GIOP::Message_Type retval; CORBA::ULong message_size; - ACE_SOCK_Stream &connection = handler->peer (); + TAO_SOCK_Stream &connection = handler->peer (); // Read the message header off the wire. // @@ -608,7 +608,7 @@ TAO_GIOP_Invocation::start (CORBA::Environment &env) return; } - // Use the ACE_SOCK_Stream from the Client_Connection_Handler for + // Use the TAO_SOCK_Stream from the Client_Connection_Handler for // communication inplace of the endpoint used below. // POLICY DECISION: If the client expects most agents to forward, diff --git a/TAO/tao/GIOP.h b/TAO/tao/GIOP.h index 8e3d54f3667..b42740595b8 100644 --- a/TAO/tao/GIOP.h +++ b/TAO/tao/GIOP.h @@ -427,7 +427,7 @@ public: static void send_error (TAO_Client_Connection_Handler *&handler); // Send an error message back to a caller. - static ssize_t read_buffer (ACE_SOCK_Stream &peer, + static ssize_t read_buffer (TAO_SOCK_Stream &peer, char *buf, size_t len); // Loop on data read ... this is required since <recv> won't block diff --git a/TAO/tao/ORB.cpp b/TAO/tao/ORB.cpp index 40e7ed25a66..b8a01d79571 100644 --- a/TAO/tao/ORB.cpp +++ b/TAO/tao/ORB.cpp @@ -703,8 +703,8 @@ CORBA::ORB_init (int &argc, template class TAO_Unbounded_Sequence<CORBA::Octet>; template class ACE_Dynamic_Service<TAO_Server_Strategy_Factory>; template class ACE_Dynamic_Service<TAO_Client_Strategy_Factory>; -template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>; -template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_NULL_MUTEX>; +template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX>; +template class ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, ACE_SYNCH_NULL_MUTEX>; template class ACE_Atomic_Op<ACE_SYNCH_MUTEX, u_int>; template class ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *>; template class ACE_Hash_Map_Manager<TAO_HASH_ADDR, TAO_Client_Connection_Handler *, ACE_SYNCH_RW_MUTEX>; @@ -719,8 +719,8 @@ template class ACE_Hash_Map_Reverse_Iterator<TAO_HASH_ADDR, TAO_Client_Connectio #pragma instantiate TAO_Unbounded_Sequence<CORBA::Octet> #pragma instantiate ACE_Dynamic_Service<TAO_Server_Strategy_Factory> #pragma instantiate ACE_Dynamic_Service<TAO_Client_Strategy_Factory> -#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX> -#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR, ACE_SYNCH_NULL_MUTEX> +#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX> +#pragma instantiate ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR, ACE_SYNCH_NULL_MUTEX> #pragma instantiate ACE_Atomic_Op<ACE_SYNCH_MUTEX, u_int> //#pragma instantiate TAO_HASH_ADDR #pragma instantiate ACE_Hash_Map_Entry<TAO_HASH_ADDR, TAO_Client_Connection_Handler *> diff --git a/TAO/tao/ORB_Core.cpp b/TAO/tao/ORB_Core.cpp index 12c8068bf44..ab056a5f955 100644 --- a/TAO/tao/ORB_Core.cpp +++ b/TAO/tao/ORB_Core.cpp @@ -988,15 +988,15 @@ TAO_ORB_Core_instance (void) template class ACE_Env_Value<int>; template class ACE_Env_Value<u_int>; -template class ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>; template class ACE_Creation_Strategy<TAO_Client_Connection_Handler>; -template class ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; -template class ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; +template class ACE_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR>; +template class ACE_Strategy_Connector<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR>; template class ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler>; template class ACE_Concurrency_Strategy<TAO_Client_Connection_Handler>; template class ACE_NOOP_Concurrency_Strategy<TAO_Client_Connection_Handler>; template class ACE_Recycling_Strategy<TAO_Client_Connection_Handler>; -template class ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR>; +template class ACE_Connector<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR>; #if 0 template class ACE_Unbounded_Stack<TAO_Client_Connection_Handler *>; #else @@ -1018,15 +1018,15 @@ template class ACE_TSS<TAO_Resource_Factory::App_Allocated>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Env_Value<int> #pragma instantiate ACE_Env_Value<u_int> -#pragma instantiate ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_Strategy_Acceptor<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR> #pragma instantiate ACE_Creation_Strategy<TAO_Client_Connection_Handler> -#pragma instantiate ACE_Connect_Strategy<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> -#pragma instantiate ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> +#pragma instantiate ACE_Connect_Strategy<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR> +#pragma instantiate ACE_Strategy_Connector<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR> #pragma instantiate ACE_NOOP_Creation_Strategy<TAO_Client_Connection_Handler> #pragma instantiate ACE_Concurrency_Strategy<TAO_Client_Connection_Handler> #pragma instantiate ACE_NOOP_Concurrency_Strategy<TAO_Client_Connection_Handler> #pragma instantiate ACE_Recycling_Strategy<TAO_Client_Connection_Handler> -#pragma instantiate ACE_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> +#pragma instantiate ACE_Connector<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR> #if 0 #pragma instantiate ACE_Unbounded_Stack<TAO_Client_Connection_Handler *> #else diff --git a/TAO/tao/ORB_Core.h b/TAO/tao/ORB_Core.h index 76aaec7fb69..9c81d003480 100644 --- a/TAO/tao/ORB_Core.h +++ b/TAO/tao/ORB_Core.h @@ -19,11 +19,11 @@ # include "tao/corba.h" -typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, ACE_SOCK_CONNECTOR> +typedef ACE_Strategy_Connector<TAO_Client_Connection_Handler, TAO_SOCK_CONNECTOR> TAO_CONNECTOR; typedef ACE_Cached_Connect_Strategy<TAO_Client_Connection_Handler, - ACE_SOCK_CONNECTOR, + TAO_SOCK_CONNECTOR, ACE_SYNCH_RW_MUTEX> TAO_CACHED_CONNECT_STRATEGY; diff --git a/TAO/tao/Server_Strategy_Factory.cpp b/TAO/tao/Server_Strategy_Factory.cpp index 9e2098d7001..4e7a58ed3a0 100644 --- a/TAO/tao/Server_Strategy_Factory.cpp +++ b/TAO/tao/Server_Strategy_Factory.cpp @@ -66,14 +66,14 @@ TAO_Server_Strategy_Factory::create_servant_lock (void) #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Creation_Strategy<TAO_Server_Connection_Handler>; -template class ACE_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; -template class ACE_Accept_Strategy<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR>; +template class ACE_Acceptor<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>; +template class ACE_Accept_Strategy<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR>; template class ACE_Concurrency_Strategy<TAO_Server_Connection_Handler>; template class ACE_Scheduling_Strategy<TAO_Server_Connection_Handler>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Creation_Strategy<TAO_Server_Connection_Handler> -#pragma instantiate ACE_Acceptor<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> -#pragma instantiate ACE_Accept_Strategy<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> +#pragma instantiate ACE_Acceptor<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR> +#pragma instantiate ACE_Accept_Strategy<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR> #pragma instantiate ACE_Concurrency_Strategy<TAO_Server_Connection_Handler> #pragma instantiate ACE_Scheduling_Strategy<TAO_Server_Connection_Handler> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ diff --git a/TAO/tao/Server_Strategy_Factory.h b/TAO/tao/Server_Strategy_Factory.h index ac8c4ab11b8..4da0546c5b3 100644 --- a/TAO/tao/Server_Strategy_Factory.h +++ b/TAO/tao/Server_Strategy_Factory.h @@ -41,7 +41,7 @@ public: // = Server-side factory types. typedef ACE_Creation_Strategy<TAO_Server_Connection_Handler> CREATION_STRATEGY; - typedef ACE_Accept_Strategy<TAO_Server_Connection_Handler, ACE_SOCK_ACCEPTOR> + typedef ACE_Accept_Strategy<TAO_Server_Connection_Handler, TAO_SOCK_ACCEPTOR> ACCEPT_STRATEGY; typedef ACE_Concurrency_Strategy<TAO_Server_Connection_Handler> CONCURRENCY_STRATEGY; diff --git a/TAO/tao/corba.h b/TAO/tao/corba.h index 13815d42401..8330536ffc6 100644 --- a/TAO/tao/corba.h +++ b/TAO/tao/corba.h @@ -25,6 +25,9 @@ #if !defined (TAO_MASTER_CORBA_H) #define TAO_MASTER_CORBA_H +// Include user-defined and platform-specific ORB configuration stuff. +#include "tao/orbconf.h" + // ACE specific includes #include "ace/OS.h" #include "ace/Get_Opt.h" @@ -74,9 +77,6 @@ #include "tao/compat/objbase.h" #include "tao/compat/initguid.h" -// ORB configuration -#include "tao/orbconf.h" - // For some reason, PC compilers don't implement "natural" alignment, // but only use fixed alignment policies. The following #pragmas // configure fixed one-byte alignment policy, since some fixed policy diff --git a/TAO/tao/orbconf.h b/TAO/tao/orbconf.h index 1bc92e77975..7bf5d9e61be 100644 --- a/TAO/tao/orbconf.h +++ b/TAO/tao/orbconf.h @@ -25,6 +25,22 @@ #include "ace/OS.h" +// Users should override this stuff if they don't want to use the +// default ACE Socket wrappers. This makes it possible to change +// TAO's transport mechanism wholesale by making a few minor changes +// to the ACE config.h file. +#if !defined (TAO_SOCK_STREAM) +#define TAO_SOCK_STREAM ACE_SOCK_STREAM +#endif /* TAO_SOCK_STREAM */ + +#if !defined (TAO_SOCK_ACCEPTOR) +#define TAO_SOCK_ACCEPTOR ACE_SOCK_ACCEPTOR +#endif /* TAO_SOCK_ACCEPTOR */ + +#if !defined (TAO_SOCK_CONNECTOR) +#define TAO_SOCK_CONNECTOR ACE_SOCK_CONNECTOR +#endif /* TAO_SOCK_CONNECTOR */ + // The default arguments of the resource factory for the fake service // configurator #if !defined (TAO_DEFAULT_RESOURCE_FACTORY_ARGS) |