2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
9 void SessionBase::set_keep_alive (bool f)
11 this->keep_alive_ = f;
15 bool SessionBase::keep_alive () const
17 return this->keep_alive_;
21 void SessionBase::set_host (const ACE_CString& host, u_short port)
23 if (!this->is_connected ())
27 this->proxy_connection_ = false;
32 void SessionBase::set_host (const ACE_CString& host)
34 if (!this->is_connected ())
37 this->proxy_connection_ = false;
42 void SessionBase::set_port (u_short port)
44 if (!this->is_connected ())
51 void SessionBase::set_proxy_target (const ACE_CString& host, u_short port)
53 if (!this->is_connected ())
55 this->proxy_target_host_ = host;
56 this->proxy_target_port_ = port;
57 this->proxy_connection_ = true;
62 const ACE_CString& SessionBase::get_host () const
68 u_short SessionBase::get_port () const
74 bool SessionBase::is_proxy_connection () const
76 return this->proxy_connection_;
80 const ACE_CString& SessionBase::get_proxy_target_host () const
82 return this->proxy_target_host_;
86 u_short SessionBase::get_proxy_target_port () const
88 return this->proxy_target_port_;
92 bool SessionBase::reconnect_needed ()
94 if (this->cannot_reconnect_)
96 if (!this->needs_reconnect_)
98 this->reconnect_countdown_.update ();
99 return this->reconnect_timer_ == ACE_Time_Value::zero;
105 void SessionBase::close_streams ()
107 if (this->in_stream_)
109 delete this->in_stream_;
110 this->in_stream_ = 0;
112 if (this->out_stream_)
114 delete this->out_stream_;
115 this->out_stream_ = 0;
121 ACE_END_VERSIONED_NAMESPACE_DECL