summaryrefslogtreecommitdiff
path: root/TAO/tao/Transport.h
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/tao/Transport.h')
-rw-r--r--TAO/tao/Transport.h104
1 files changed, 54 insertions, 50 deletions
diff --git a/TAO/tao/Transport.h b/TAO/tao/Transport.h
index 4b885eb40e5..b6059b211fe 100644
--- a/TAO/tao/Transport.h
+++ b/TAO/tao/Transport.h
@@ -447,6 +447,7 @@ public:
virtual ACE_Event_Handler * event_handler_i (void) = 0;
protected:
+
virtual TAO_Connection_Handler * connection_handler_i (void) = 0;
public:
@@ -488,7 +489,6 @@ public:
virtual int handle_input (TAO_Resume_Handle &rh,
ACE_Time_Value *max_wait_time = 0,
int block = 0);
- void try_to_complete (ACE_Time_Value *max_wait_time);
enum
{
@@ -568,11 +568,60 @@ public:
protected:
+ /// Called by the handle_input_i (). This method is used to parse
+ /// message read by the handle_input_i () call. It also decides
+ /// whether the message needs consolidation before processing.
+ int parse_consolidate_messages (ACE_Message_Block &bl,
+ TAO_Resume_Handle &rh,
+ ACE_Time_Value *time = 0);
+
+
+ /// Method does parsing of the message if we have a fresh message in
+ /// the <message_block> or just returns if we have read part of the
+ /// previously stored message.
+ int parse_incoming_messages (ACE_Message_Block &message_block);
+
+ /// Return if we have any missing data in the queue of messages
+ /// or determine if we have more information left out in the
+ /// presently read message to make it complete.
+ size_t missing_data (ACE_Message_Block &message_block);
+
+ /// Consolidate the currently read message or consolidate the last
+ /// message in the queue. The consolidation of the last message in
+ /// the queue is done by calling consolidate_message_queue ().
+ virtual int consolidate_message (ACE_Message_Block &incoming,
+ ssize_t missing_data,
+ TAO_Resume_Handle &rh,
+ ACE_Time_Value *max_wait_time);
+
+ /// @@Bala: Docu???
+ int consolidate_fragments (TAO_Queued_Data *qd,
+ TAO_Resume_Handle &rh);
+
+ /// First consolidate the message queue. If the message is still not
+ /// complete, try to read from the handle again to make it
+ /// complete. If these dont help put the message back in the queue
+ /// and try to check the queue if we have message to process. (the
+ /// thread needs to do some work anyway :-))
+ int consolidate_message_queue (ACE_Message_Block &incoming,
+ ssize_t missing_data,
+ TAO_Resume_Handle &rh,
+ ACE_Time_Value *max_wait_time);
+
+ /// Called by parse_consolidate_message () if we have more messages
+ /// in one read. Queue up the messages and try to process one of
+ /// them, atleast at the head of them.
+ int consolidate_extra_messages (ACE_Message_Block &incoming,
+ TAO_Resume_Handle &rh);
+
/// Process the message by sending it to the higher layers of the
/// ORB.
int process_parsed_messages (TAO_Queued_Data *qd,
TAO_Resume_Handle &rh);
+ /// Make a queued data from the <incoming> message block
+ TAO_Queued_Data *make_queued_data (ACE_Message_Block &incoming);
+
/// Implement send_message_shared() assuming the handler_lock_ is
/// held.
int send_message_shared_i (TAO_Stub *stub,
@@ -620,40 +669,6 @@ public:
int handle_timeout (const ACE_Time_Value &current_time,
const void* act);
- /// Accessor to recv_buffer_size_
- size_t recv_buffer_size (void);
-
- /// Accessor to sent_byte_count_
- size_t sent_byte_count (void);
-
-
- /*!
- \name Incoming Queue Methods
- */
- //@{
- /*!
- \brief Queue up \a queueable_message as a completely-received incoming message.
-
- This method queues up a completely-received queueable GIOP message
- (i.e., it must be dynamically-allocated). It does not assemble a
- complete GIOP message; that should be done prior to calling this
- message, and is currently done in handle_input_i.
-
- This does, however, assure that a completely-received GIOP
- FRAGMENT gets associated with any previously-received related
- fragments. It does this through collaboration with the messaging
- object (since fragment reassembly is protocol specific).
-
- \param queueable_message instance as returned by one of the TAO_Queued_Data::make_*_message that's been completely received
-
- \return 0 successfully enqueued \a queueable_message
-
- \return -1 failed to enqueue \a queueable_message
- \todo How do we indicate \em what may have failed?
- */
- int enqueue_incoming_message (TAO_Queued_Data *queueable_message);
- //@}
-
/// CodeSet Negotiation - Get the char codeset translator factory
///
TAO_Codeset_Translator_Factory *char_translator (void) const;
@@ -777,14 +792,10 @@ private:
/// Print out error messages if the event handler is not valid
void report_invalid_event_handler (const char *caller);
- /**
+ /*
* Process the message that is in the head of the incoming queue.
* If there are more messages in the queue, this method calls
- * this->notify_reactor () to wake up a thread.
- *
- * \return -1 An error occurred; occurs independent presence of messages in the queue.
- * \return 1 No messages in the queue to process; nothing processed.
- * \return 0 Messages were in the queue to process and one got processed.
+ * this->notify_reactor () to wake up a thread
*/
int process_queue_head (TAO_Resume_Handle &rh);
@@ -845,12 +856,9 @@ protected:
TAO_Queued_Message *head_;
TAO_Queued_Message *tail_;
- /// Queue of the completely-received incoming messages..
+ /// Queue of the incoming messages..
TAO_Incoming_Message_Queue incoming_message_queue_;
- /// Place to hold a partially-received (waiting-to-be-completed) message
- TAO_Queued_Data * uncompleted_message_;
-
/// The queue will start draining no later than <queing_deadline_>
/// *if* the deadline is
ACE_Time_Value current_deadline_;
@@ -885,11 +893,8 @@ protected:
/// Used by the LRU, LFU and FIFO Connection Purging Strategies.
unsigned long purging_order_;
- /// Size of the buffer received.
- size_t recv_buffer_size_;
+private:
- /// Number of bytes sent.
- size_t sent_byte_count_;
/// @@Phil, I think it would be nice if we could think of a way to
/// do the following.
/// We have been trying to use the transport for marking about
@@ -902,7 +907,6 @@ protected:
/// we can move this to the connection_handler and it may more sense
/// with the DSCP stuff around there. Do you agree?
-private:
/// Additional member values required to support codeset translation
TAO_Codeset_Translator_Factory *char_translator_;
TAO_Codeset_Translator_Factory *wchar_translator_;