Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / protocols / ace / HTBP / HTBP_Session.inl
blobfa05f2100b0133943983cc536f8322d3da31707a
1 // -*- C++ -*-
2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE
5 void
6 ACE::HTBP::Session::reconnect () const
8   if (!this->closed_ && this->proxy_addr_)
9     {
10       if (inbound_ &&
11           inbound_->ace_stream().get_handle() == ACE_INVALID_HANDLE)
12         reconnect_i (inbound_);
13       if (outbound_ &&
14           outbound_->ace_stream().get_handle() == ACE_INVALID_HANDLE)
15         reconnect_i (outbound_);
16     }
19 ACE_INLINE
20 void
21 ACE::HTBP::Session::inbound (ACE::HTBP::Channel *s)
23   this->inbound_ = s;
27 ACE_INLINE
28 void
29 ACE::HTBP::Session::outbound (ACE::HTBP::Channel *s)
31   this->outbound_ = s;
34 ACE_INLINE
35 ACE::HTBP::Channel *
36 ACE::HTBP::Session::inbound () const
38   return this->inbound_;
41 ACE_INLINE
42 const ACE::HTBP::Session_Id_t&
43 ACE::HTBP::Session::session_id() const
45   return this->session_id_;
48 // I'm wondering if this should be coupled with a map update...?
49 ACE_INLINE
50 void
51 ACE::HTBP::Session::session_id (ACE_UINT32 id)
53   this->session_id_.id_ = id;
56 ACE_INLINE
57 const ACE_INET_Addr *
58 ACE::HTBP::Session::proxy_addr () const
60   return this->proxy_addr_;
63 ACE_INLINE
64 const ACE::HTBP::Addr &
65 ACE::HTBP::Session::peer_addr () const
67   return this->session_id_.peer_;
70 ACE_INLINE
71 const ACE::HTBP::Addr &
72 ACE::HTBP::Session::local_addr () const
74   return this->session_id_.local_;
77 ACE_INLINE
78 void
79 ACE::HTBP::Session::proxy_addr (ACE_INET_Addr *pa, int destroy)
81   if (this->destroy_proxy_addr_)
82     delete this->proxy_addr_;
83   this->proxy_addr_ = pa;
84   this->destroy_proxy_addr_ = destroy;
87 ACE_INLINE
88 int
89 ACE::HTBP::Session::sock_flags () const
91   return this->sock_flags_;
94 //---------------------------------------------------------------------------
95 ACE_INLINE
96 u_long
97 ACE::HTBP::Session_Id_t::hash () const
99   return id_; // + local.hash() + peer.hash();
102 ACE_INLINE
103 bool
104 ACE::HTBP::Session_Id_t::operator ==(const ACE::HTBP::Session_Id_t &other) const
106   return ((this->id_ == other.id_) &&
107           (this->local_ == other.local_) &&
108           (this->peer_ == other.peer_));
111 ACE_END_VERSIONED_NAMESPACE_DECL