#include <QoS_Session_Impl.h>
Inheritance diagram for ACE_GQoS_Session:
Public Member Functions | |
~ACE_GQoS_Session (void) | |
Default destructor. | |
virtual int | open (ACE_INET_Addr dest_addr, ACE_Protocol_ID protocol_id) |
Open a GQoS session [dest IP, dest port, Protocol ID]. | |
virtual int | close (void) |
Close the GQoS Session. | |
virtual ACE_QoS | qos (void) const |
Returns the QoS for this GQoS session. | |
virtual int | qos (ACE_SOCK *socket, ACE_QoS_Manager *qos_manager, const ACE_QoS &ace_qos) |
virtual void | qos (const ACE_QoS &ace_qos) |
virtual int | update_qos (void) |
virtual ACE_End_Point_Type | flags (void) const |
Get/Set methods for the flags_. | |
virtual void | flags (const ACE_End_Point_Type flags) |
virtual ACE_INET_Addr | dest_addr (void) const |
Get the destination address for this GQoS session. | |
virtual void | dest_addr (const ACE_INET_Addr &dest_addr) |
Set the destination address for this GQoS session. | |
virtual u_short | source_port (void) const |
Get the source port for this session. | |
virtual void | source_port (const u_short &source_port) |
Set the source port for this session. | |
virtual ACE_INET_Addr * | source_addr (void) const |
virtual void | source_addr (ACE_INET_Addr *source_addr) |
Set the source port for this session. | |
virtual int | session_id (void) const |
Get the GQoS session id. | |
virtual void | session_id (const int session_id) |
Set the GQoS session id. | |
virtual ACE_HANDLE | rsvp_events_handle (void) |
Get the file descriptor of the underlying socket. | |
virtual void | rsvp_event_type (RSVP_Event_Type event_type) |
virtual RSVP_Event_Type | rsvp_event_type (void) |
Set the RAPI event that last occured. | |
virtual int | version () |
GQoS version. | |
Static Public Attributes | |
static int | GQoS_session_id = 0 |
Private Member Functions | |
ACE_GQoS_Session (void) | |
Friends | |
class | ACE_QoS_Session_Factory |
This class is a GQoS (Generic QoS, an implementation of RSVP on Win2K) implementation of the ACE_QoS_Session interface.
Definition at line 165 of file QoS_Session_Impl.h.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE ACE_GQoS_Session::~ACE_GQoS_Session | ( | void | ) |
Default destructor.
Definition at line 125 of file QoS_Session_Impl.inl.
References ACE_TRACE.
00126 { 00127 ACE_TRACE ("ACE_GQoS_Session::~ACE_GQoS_Session"); 00128 }
ACE_GQoS_Session::ACE_GQoS_Session | ( | void | ) | [private] |
Default constructor. Constructor is defined private so that only the friend factory can instantiate this class.
Definition at line 634 of file QoS_Session_Impl.cpp.
References ACE_TRACE.
00635 { 00636 ACE_TRACE ("ACE_GQoS_Session::ACE_GQoS_Session"); 00637 }
int ACE_GQoS_Session::close | ( | void | ) | [virtual] |
Close the GQoS Session.
Implements ACE_QoS_Session.
Definition at line 654 of file QoS_Session_Impl.cpp.
ACE_INLINE void ACE_GQoS_Session::dest_addr | ( | const ACE_INET_Addr & | dest_addr | ) | [virtual] |
Set the destination address for this GQoS session.
Implements ACE_QoS_Session.
Definition at line 191 of file QoS_Session_Impl.inl.
References dest_addr(), and ACE_QoS_Session::dest_addr_.
00192 { 00193 this->dest_addr_ = dest_addr; 00194 }
ACE_INLINE ACE_INET_Addr ACE_GQoS_Session::dest_addr | ( | void | ) | const [virtual] |
Get the destination address for this GQoS session.
Implements ACE_QoS_Session.
Definition at line 184 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::dest_addr_.
Referenced by dest_addr(), and open().
00185 { 00186 return this->dest_addr_; 00187 }
ACE_INLINE void ACE_GQoS_Session::flags | ( | const ACE_End_Point_Type | flags | ) | [virtual] |
ACE_INLINE ACE_QoS_Session::ACE_End_Point_Type ACE_GQoS_Session::flags | ( | void | ) | const [virtual] |
Get/Set methods for the flags_.
Implements ACE_QoS_Session.
Definition at line 170 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::flags_.
00171 { 00172 return this->flags_; 00173 }
int ACE_GQoS_Session::open | ( | ACE_INET_Addr | dest_addr, | |
ACE_Protocol_ID | protocol_id | |||
) | [virtual] |
Open a GQoS session [dest IP, dest port, Protocol ID].
Implements ACE_QoS_Session.
Definition at line 641 of file QoS_Session_Impl.cpp.
References dest_addr(), ACE_QoS_Session::dest_addr_, GQoS_session_id, ACE_QoS_Session::protocol_id_, and ACE_QoS_Session::session_id_.
00643 { 00644 this->dest_addr_ = dest_addr; 00645 this->protocol_id_ = protocol_id; 00646 00647 this->session_id_ = GQoS_session_id++; 00648 00649 return 0; 00650 }
ACE_INLINE void ACE_GQoS_Session::qos | ( | const ACE_QoS & | ace_qos | ) | [virtual] |
Sets the QoS for this session object to ace_qos. Does not interfere with the QoS in the underlying socket. This call is useful to update the QoS object when the underlying socket QoS is being set through a mechanism other than the previous qos () method e.g. inside the dgram_mcast.subscribe () where the QoS for the socket is set through ACE_OS::join_leaf ().
Implements ACE_QoS_Session.
Definition at line 140 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::qos_.
00141 { 00142 this->qos_ = ace_qos; 00143 }
int ACE_GQoS_Session::qos | ( | ACE_SOCK * | socket, | |
ACE_QoS_Manager * | qos_manager, | |||
const ACE_QoS & | ace_qos | |||
) | [virtual] |
Set QoS for this GQoS session. The socket parameter is used to confirm if this QoS session was subscribed to by the socket.
Implements ACE_QoS_Session.
Definition at line 662 of file QoS_Session_Impl.cpp.
References ACE_DEBUG, ACE_ERROR_RETURN, ACE_SIO_SET_QOS, ACE_TEXT, ACE_OS::ioctl(), LM_DEBUG, LM_ERROR, qos(), ACE_QoS_Manager::qos_session_set(), and socket().
00665 { 00666 00667 // Confirm if the current session is one of the QoS sessions 00668 // subscribed to by the given socket. 00669 00670 if (qos_manager->qos_session_set ().find (this) == -1) 00671 ACE_ERROR_RETURN ((LM_ERROR, 00672 ACE_TEXT ("This QoS session was not subscribed to") 00673 ACE_TEXT (" by the socket\n")), 00674 -1); 00675 00676 // Set the QOS according to the supplied ACE_QoS. The I/O control 00677 // code used under the hood is SIO_SET_QOS. 00678 00679 u_long ret_bytes = 0; 00680 00681 ACE_QoS qos = ace_qos; 00682 if (ACE_OS::ioctl (socket->get_handle (), 00683 ACE_SIO_SET_QOS, 00684 qos, 00685 &ret_bytes) == -1) 00686 ACE_ERROR_RETURN ((LM_ERROR, 00687 ACE_TEXT ("Error in Qos set ACE_OS::ioctl() %d\n"), 00688 ret_bytes), 00689 -1); 00690 else 00691 ACE_DEBUG ((LM_DEBUG, 00692 ACE_TEXT ("Setting QoS with ACE_OS::ioctl () succeeds \n"))); 00693 00694 return 0; 00695 }
ACE_INLINE ACE_QoS ACE_GQoS_Session::qos | ( | void | ) | const [virtual] |
Returns the QoS for this GQoS session.
Implements ACE_QoS_Session.
Definition at line 132 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::qos_.
Referenced by qos().
00133 { 00134 return this->qos_; 00135 }
ACE_QoS_Session::RSVP_Event_Type ACE_GQoS_Session::rsvp_event_type | ( | void | ) | [virtual] |
Set the RAPI event that last occured.
Implements ACE_QoS_Session.
Definition at line 706 of file QoS_Session_Impl.cpp.
References ACE_QoS_Session::rsvp_event_type_.
00707 { 00708 return this->rsvp_event_type_; 00709 }
virtual void ACE_GQoS_Session::rsvp_event_type | ( | RSVP_Event_Type | event_type | ) | [virtual] |
ACE_INLINE ACE_HANDLE ACE_GQoS_Session::rsvp_events_handle | ( | void | ) | [virtual] |
Get the file descriptor of the underlying socket.
Implements ACE_QoS_Session.
Definition at line 163 of file QoS_Session_Impl.inl.
ACE_INLINE void ACE_GQoS_Session::session_id | ( | const int | session_id | ) | [virtual] |
Set the GQoS session id.
Implements ACE_QoS_Session.
Definition at line 154 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::session_id_.
00155 { 00156 this->session_id_ = session_id; 00157 }
ACE_INLINE int ACE_GQoS_Session::session_id | ( | void | ) | const [virtual] |
Get the GQoS session id.
Implements ACE_QoS_Session.
Definition at line 147 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::session_id_.
00148 { 00149 return this->session_id_; 00150 }
ACE_INLINE void ACE_GQoS_Session::source_addr | ( | ACE_INET_Addr * | source_addr | ) | [virtual] |
Set the source port for this session.
Implements ACE_QoS_Session.
Definition at line 217 of file QoS_Session_Impl.inl.
References source_addr(), and ACE_QoS_Session::src_addr_.
00218 { 00219 this->src_addr_ = source_addr; 00220 }
ACE_INLINE ACE_INET_Addr * ACE_GQoS_Session::source_addr | ( | void | ) | const [virtual] |
Implements ACE_QoS_Session.
Definition at line 211 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::src_addr_.
Referenced by source_addr().
00212 { 00213 return this->src_addr_; 00214 }
ACE_INLINE void ACE_GQoS_Session::source_port | ( | const u_short & | source_port | ) | [virtual] |
Set the source port for this session.
Implements ACE_QoS_Session.
Definition at line 205 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::source_port_.
00206 { 00207 this->source_port_ = source_port; 00208 }
ACE_INLINE u_short ACE_GQoS_Session::source_port | ( | void | ) | const [virtual] |
Get the source port for this session.
Implements ACE_QoS_Session.
Definition at line 198 of file QoS_Session_Impl.inl.
References ACE_QoS_Session::source_port_.
00199 { 00200 return this->source_port_; 00201 }
int ACE_GQoS_Session::update_qos | ( | void | ) | [virtual] |
Calls the ioctl (ACE_SIO_GET_QOS). It is a mechanism of updating the QoS for this session asynchronously, as RSVP events occur.
Implements ACE_QoS_Session.
Definition at line 698 of file QoS_Session_Impl.cpp.
ACE_INLINE int ACE_GQoS_Session::version | ( | ) | [virtual] |
friend class ACE_QoS_Session_Factory [friend] |
The factory is a friend so it can create this object through the only private constructor.
Definition at line 248 of file QoS_Session_Impl.h.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL ACE_END_VERSIONED_NAMESPACE_DECL ACE_BEGIN_VERSIONED_NAMESPACE_DECL int ACE_GQoS_Session::GQoS_session_id = 0 [static] |
This is a session ID generator. It does a lot more than expected from an int!.
Definition at line 175 of file QoS_Session_Impl.h.
Referenced by open().