From e87d735214a4509aa65b49e7c7ab7de616eee798 Mon Sep 17 00:00:00 2001 From: Chris Cleeland Date: Mon, 15 Dec 2003 22:31:47 +0000 Subject: Tag: pmb_integration Started work on performance enhancements for PMB. --- TAO/tao/GIOP_Message_Base.h | 52 ++++++++++++++++++++++++--------------------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/TAO/tao/GIOP_Message_Base.h b/TAO/tao/GIOP_Message_Base.h index 461673bd359..7bf61e340f7 100644 --- a/TAO/tao/GIOP_Message_Base.h +++ b/TAO/tao/GIOP_Message_Base.h @@ -94,35 +94,37 @@ public: /// the message. virtual int format_message (TAO_OutputCDR &cdr); - /// Parse the incoming messages.. - virtual int parse_incoming_messages (ACE_Message_Block &message_block); + /// Process the request message that we have received on the + /// connection + virtual int process_request_message (TAO_Transport *transport, + TAO_Queued_Data *qd); - /// Calculate the amount of data that is missing in the - /// message block. - virtual ssize_t missing_data (ACE_Message_Block &message_block); + /*! + \brief Inspects the bytes in \param mb to see if they "look like" the beginning of a message. - /* Extract the details of the next message from the - * through . Returns 1 if there are more messages and returns a - * 0 if there are no more messages in . - */ - virtual int extract_next_message (ACE_Message_Block &incoming, - TAO_Queued_Data *&qd); + Inspects the bytes in \param mb, beginning at \code mb.rd_ptr, to + see if they look like the beginning of a message. If \code mb does not + contain less than \code header_length() bytes, this method cannot make a + complete evaluation, and returns a commensurate value. - /// Check whether the node needs consolidation from - virtual int consolidate_node (TAO_Queued_Data *qd, - ACE_Message_Block &incoming); + \return 1 \code header_length() bytes found, and constitute a valid header + \return 0 \code header_length() bytes found, and do not constitute a valid header + \return -1 not enough bytes available to make a determination of header validity + */ + virtual int check_for_valid_header (const ACE_Message_Block &mb) const; - /// Get the details of the message parsed through the . - virtual void get_message_data (TAO_Queued_Data *qd); + /*! + \brief Set fields in \param qd based on values derived from \param mb. - /// @@Bala:Docu?? - virtual int consolidate_fragments (TAO_Queued_Data *dqd, - const TAO_Queued_Data *sqd); + This function sets fields in \param qd based on values derived + from \param mb. It assumes that if the length of \param mb is + enough to hold a header, then the data in there can be trusted to + make sense. + */ + virtual void set_queued_data_from_message_header ( + TAO_Queued_Data *, + const ACE_Message_Block &mb) const; - /// Process the request message that we have received on the - /// connection - virtual int process_request_message (TAO_Transport *transport, - TAO_Queued_Data *qd); /// Parse the reply message that we received and return the reply @@ -174,7 +176,7 @@ protected: /// TAO_PLUGGABLE_MESSAGE_REPLY, /// TAO_PLUGGABLE_MESSAGE_CLOSECONNECTION, /// TAO_PLUGGABLE_MESSAGE_MESSAGE_ERROR. - TAO_Pluggable_Message_Type message_type (TAO_GIOP_Message_State &state); + TAO_Pluggable_Message_Type message_type (TAO_GIOP_Message_State &state) const; private: @@ -197,10 +199,12 @@ private: /// Send error messages int send_error (TAO_Transport *transport); +#if 0 /// Close a connection, first sending GIOP::CloseConnection. void send_close_connection (const TAO_GIOP_Message_Version &version, TAO_Transport *transport, void *ctx); +#endif /// We must send a LocateReply through , this request /// resulted in some kind of exception. -- cgit v1.2.1