diff options
author | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:03:45 +0000 |
---|---|---|
committer | coryan <coryan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2001-04-24 08:03:45 +0000 |
commit | 3613932322a2d631e7fbf327df8503e271861ba0 (patch) | |
tree | 573bca8bde161a26c8c2b22eb668c421a12050db /apps | |
parent | e588f487fe14b34a642a62bd0cb53877a42b4793 (diff) | |
download | ATCD-3613932322a2d631e7fbf327df8503e271861ba0.tar.gz |
ChangeLogTag:Sat Apr 14 10:51:39 2001 Carlos O'Ryan <coryan@uci.edu>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/Gateway/Gateway/Concurrency_Strategies.h | 74 | ||||
-rw-r--r-- | apps/Gateway/Gateway/Peer_Message.h | 89 |
2 files changed, 0 insertions, 163 deletions
diff --git a/apps/Gateway/Gateway/Concurrency_Strategies.h b/apps/Gateway/Gateway/Concurrency_Strategies.h deleted file mode 100644 index 28e59a4b2e6..00000000000 --- a/apps/Gateway/Gateway/Concurrency_Strategies.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - -// ============================================================================ -// -// = LIBRARY -// apps -// -// = FILENAME -// Concurrency_strategies.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (_CONCURRENCY_STRATEGIES) -#define _CONCURRENCY_STRATEGIES - -#include "ace/Synch.h" - -// The following typedefs are used in order to parameterize the -// synchronization policies without changing the source code! - -// If we don't have threads then use the single-threaded synchronization. -#if !defined (ACE_HAS_THREADS) -#define SYNCH_STRATEGY ACE_NULL_SYNCH -typedef ACE_Null_Mutex MAP_MUTEX; -#else /* ACE_HAS_THREADS */ - -// Note that we only need to make the ACE_Task thread-safe if we are -// using the multi-threaded Thr_Consumer_Proxy... -#if defined (USE_OUTPUT_MT) -#define SYNCH_STRATEGY ACE_MT_SYNCH -#else -#define SYNCH_STRATEGY ACE_NULL_SYNCH -#endif /* USE_OUTPUT_MT || USE_INPUT_MT */ - -// Note that we only need to make the ACE_Map_Manager thread-safe if -// we are using the multi-threaded Thr_Supplier_Proxy. In this -// case, we use an RW_Mutex since we'll lookup Consumers far more -// often than we'll update them. -#if defined (USE_INPUT_MT) -typedef ACE_RW_Mutex MAP_MUTEX; -#else -typedef ACE_Null_Mutex MAP_MUTEX; -#endif /* USE_INPUT_MT */ -#endif /* ACE_HAS_THREADS */ - -// = Forward decls -class Thr_Consumer_Proxy; -class Thr_Supplier_Proxy; -class Consumer_Proxy; -class Supplier_Proxy; - -#if defined (ACE_HAS_THREADS) && (defined (USE_OUTPUT_MT) || defined (USE_INPUT_MT)) -#if defined (USE_OUTPUT_MT) -typedef Thr_Consumer_Proxy CONSUMER_PROXY; -#else -typedef Consumer_Proxy CONSUMER_PROXY; -#endif /* USE_OUTPUT_MT */ - -#if defined (USE_INPUT_MT) -typedef Thr_Supplier_Proxy SUPPLIER_PROXY; -#else -typedef Supplier_Proxy SUPPLIER_PROXY; -#endif /* USE_INPUT_MT */ -#else -// Instantiate a non-multi-threaded Gateway. -typedef Supplier_Proxy SUPPLIER_PROXY; -typedef Consumer_Proxy CONSUMER_PROXY; -#endif /* ACE_HAS_THREADS */ - -#endif /* _CONCURRENCY_STRATEGIES */ diff --git a/apps/Gateway/Gateway/Peer_Message.h b/apps/Gateway/Gateway/Peer_Message.h deleted file mode 100644 index d9e65650095..00000000000 --- a/apps/Gateway/Gateway/Peer_Message.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -*- C++ -*- */ -// $Id$ - - -// ============================================================================ -// -// = LIBRARY -// apps -// -// = FILENAME -// Peer_Message.h -// -// = AUTHOR -// Doug Schmidt -// -// ============================================================================ - -#if !defined (PEER_MESSAGE) -#define PEER_MESSAGE - -// This is the unique connection identifier that denotes a particular -// Channel in the Gateway. -typedef short CONN_ID; - -class Peer_Addr - // = TITLE - // Peer address is used to identify the source/destination of a - // routing message. -{ -public: - Peer_Addr (CONN_ID cid = -1, u_char lid = 0, u_char pay = 0) - : conn_id_ (cid), logical_id_ (lid), payload_ (pay) {} - - int operator== (const Peer_Addr &pa) const - { - return this->conn_id_ == pa.conn_id_ - && this->logical_id_ == pa.logical_id_ - && this->payload_ == pa.payload_; - } - - CONN_ID conn_id_; - // Unique connection identifier that denotes a particular Channel. - - u_char logical_id_; - // Logical ID. - - u_char payload_; - // Payload type. -}; - - -class Peer_Header - // = TITLE - // Fixed sized header. -{ -public: - typedef u_short ROUTING_ID; - // Type used to route messages from gatewayd. - - enum - { - INVALID_ID = -1 // No peer can validly use this number. - }; - - ROUTING_ID routing_id_; - // Source ID. - - size_t len_; - // Length of the message in bytes. -}; - -class Peer_Message - // = TITLE - // Variable-sized message (buf_ may be variable-sized between - // 0 and MAX_PAYLOAD_SIZE). -{ -public: - enum { MAX_PAYLOAD_SIZE = 1024 }; - // The maximum size of an Peer message (see Peer protocol specs for - // exact #). - - Peer_Header header_; - // Message header. - - char buf_[MAX_PAYLOAD_SIZE]; - // Message payload. -}; - -#endif /* PEER_MESSAGE */ |