5 #ifndef __XMPP_SESSION_H__
6 #define __XMPP_SESSION_H__
21 bool async_ready =
true);
28 virtual void WriteReady(
const boost::system::error_code &error);
33 void IncStats(
unsigned int message_type, uint64_t bytes);
57 bool Match(
Buffer buffer,
int *result,
bool NewBuf);
58 void SetBuf(
const std::string &);
70 boost::match_results<std::string::const_iterator>
res_;
boost::asio::ssl::stream< boost::asio::ip::tcp::socket > SslSocket
boost::asio::const_buffer Buffer
std::vector< StatsPair > stats_
static const contrail::regex whitespace_
static const contrail::regex proceed_patt_
XmppConnection * Connection()
boost::match_results< std::string::const_iterator > res_
int MatchRegex(const contrail::regex &patt)
void IncStats(unsigned int message_type, uint64_t bytes)
static const int kMaxMessageSize
virtual void OnRead(Buffer buffer)
boost::system::error_code EnableTcpKeepalive(int tcp_hold_time)
XmppSession(XmppConnectionManager *manager, SslSocket *sock, bool async_ready=true)
XmppConnectionManager * manager_
std::deque< Buffer > BufferQueue
std::pair< uint64_t, uint64_t > StatsPair
void SetConnection(XmppConnection *connection)
static const contrail::regex end_patt_
virtual int GetSessionInstance() const
void SetBuf(const std::string &)
static const int kSessionKeepaliveProbes
std::string::const_iterator offset_
static const contrail::regex patt_
XmppConnection * connection_
contrail::regex tag_to_pattern(const char *)
virtual void WriteReady(const boost::system::error_code &error)
static const contrail::regex stream_patt_
StatsPair Stats(unsigned int message_type) const
static const contrail::regex stream_res_end_
friend class XmppRegexMock
static const contrail::regex starttls_patt_
static const contrail::regex stream_features_patt_
void ReplaceBuf(const std::string &)
bool Match(Buffer buffer, int *result, bool NewBuf)
bool stream_open_matched_
DISALLOW_COPY_AND_ASSIGN(XmppSession)