Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / protocols / ace / HTBP / HTBP_Channel.inl
blobb8d2f58c97c08c8685f2da0d4c1b052ca5eb3cc5
1 // -*- C++ -*-
2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 ACE_INLINE
5 ACE::HTBP::Session *
6 ACE::HTBP::Channel::session () const
8   return this->session_;
11 // session assignment only occurs when the stream is transferred to another
12 // session. Do *not* delete the old session object.
13 ACE_INLINE
14 void
15 ACE::HTBP::Channel::session (ACE::HTBP::Session *s)
17   this->session_ = s;
20 // I'm not sure of the proper use case for getting the filter reference. The
21 // problem is that the filter is not reference counted, so the returned value
22 // should not be stored.
23 ACE_INLINE
24 ACE::HTBP::Filter *
25 ACE::HTBP::Channel::filter () const
27   return this->filter_;
30 // Filters are owned by the channel. If a new filter is applied, the old one
31 // must be deleted.
32 ACE_INLINE
33 void
34 ACE::HTBP::Channel::filter (ACE::HTBP::Filter *f)
36   delete this->filter_;
37   this->filter_ = f;
40 ACE_INLINE
41 int
42 ACE::HTBP::Channel::close_reader ()
44   return this->ace_stream_.close_reader();
47 ACE_INLINE
48 int
49 ACE::HTBP::Channel::close_writer ()
51   return this->ace_stream_.close_writer();
54 ACE_INLINE
55 int
56 ACE::HTBP::Channel::close ()
58   return this->ace_stream_.close();
61 ACE_INLINE
62 ACE::HTBP::Channel::State
63 ACE::HTBP::Channel::state () const
65   return this->state_;
68 ACE_INLINE
69 ACE_Message_Block &
70 ACE::HTBP::Channel::leftovers ()
72   return this->leftovers_;
75 ACE_INLINE
76 size_t
77 ACE::HTBP::Channel::data_len() const
79   return this->data_len_;
82 ACE_INLINE
83 void
84 ACE::HTBP::Channel::data_len(size_t n)
86   this->data_len_ = n;
89 ACE_INLINE
90 size_t
91 ACE::HTBP::Channel::data_consumed() const
93   return this->data_consumed_;
97 ACE_INLINE
98 const ACE_SOCK_Stream&
99 ACE::HTBP::Channel::ace_stream () const
101   return this->ace_stream_;
104 ACE_INLINE
105 ACE_SOCK_Stream&
106 ACE::HTBP::Channel::ace_stream ()
108   return this->ace_stream_;
111 ACE_INLINE
112 void
113 ACE::HTBP::Channel::set_handle (ACE_HANDLE h)
115   if (h == 0)
116     return;
117   this->ace_stream_.set_handle (h);
120 ACE_END_VERSIONED_NAMESPACE_DECL