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