|
OpenSDN source code
|
#include <xmpp_client.h>


Classes | |
| class | DeleteActor |
Public Types | |
| typedef boost::asio::ip::tcp::endpoint | Endpoint |
| typedef boost::function< void(XmppChannelMux *, xmps::PeerState)> | ConnectionEventCb |
Public Types inherited from SslServer | |
| typedef boost::asio::ssl::stream< boost::asio::ip::tcp::socket > | SslSocket |
Public Types inherited from TcpServer | |
| typedef boost::asio::ip::tcp::endpoint | Endpoint |
| typedef boost::asio::ip::tcp::socket | Socket |
| typedef boost::asio::ip::tcp::socket::native_handle_type | NativeSocketType |
Public Member Functions | |
| XmppClient (EventManager *evm) | |
| XmppClient (EventManager *evm, const XmppChannelConfig *config) | |
| virtual | ~XmppClient () |
| void | Shutdown () |
| void | RegisterConnectionEvent (xmps::PeerId, ConnectionEventCb) |
| void | UnRegisterConnectionEvent (xmps::PeerId) |
| void | NotifyConnectionEvent (XmppChannelMux *, xmps::PeerState) |
| size_t | ConnectionEventCount () const |
| virtual TcpSession * | CreateSession () |
| virtual bool | Initialize (short port) |
| XmppClientConnection * | CreateConnection (const XmppChannelConfig *config) |
| XmppClientConnection * | FindConnection (const std::string &address) |
| void | InsertConnection (XmppClientConnection *connection) |
| void | RemoveConnection (XmppClientConnection *connection) |
| size_t | ConnectionCount () const |
| XmppChannel * | FindChannel (const std::string &address) |
| void | ConfigUpdate (const XmppConfigData *cfg) |
| XmppConfigManager * | xmpp_config_mgr () |
| LifetimeManager * | lifetime_manager () |
| virtual LifetimeActor * | deleter () |
| int | SetDscpValue (uint8_t value, const char *conn_id) |
| uint32_t | XmppTimeOut (const char *conn_id) |
| void | UpdateTimeOut (uint8_t time_out, const char *conn_id) |
Public Member Functions inherited from XmppConnectionManager | |
| XmppConnectionManager (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled, bool ssl_handshake_delayed) | |
| void | Shutdown () |
| void | EnqueueSession (XmppSession *session) |
| size_t | GetSessionQueueSize () const |
| tbb::mutex & | mutex () const |
Public Member Functions inherited from SslServer | |
| SslServer (EventManager *evm, boost::asio::ssl::context::method m, bool ssl_enabled=true, bool ssl_handshake_delayed=false) | |
| virtual | ~SslServer () |
Public Member Functions inherited from TcpServer | |
| TcpServer (EventManager *evm) | |
| virtual | ~TcpServer () |
| virtual bool | Initialize (unsigned short port) |
| virtual bool | Initialize (unsigned short port, const IpAddress &host_ip, int intf_id=-1) |
| bool | InitializeInternal (boost::asio::ip::tcp::endpoint localaddr) |
| const std::string | ToString () const |
| void | SetAcceptor () |
| void | ResetAcceptor () |
| void | Shutdown () |
| void | ClearSessions () |
| void | UpdateSessionsDscp (uint8_t dscp) |
| virtual void | DeleteSession (TcpSession *session) |
| virtual void | Connect (TcpSession *session, Endpoint remote) |
| virtual bool | DisableSandeshLogMessages () const |
| int | GetPort () const |
| const io::SocketStats & | GetSocketStats () const |
| size_t | GetSessionCount () const |
| EventManager * | event_manager () |
| bool | HasSessionReadAvailable () const |
| bool | HasSessions () const |
| TcpSession * | GetSession (Endpoint remote) |
| void | WaitForEmpty () |
| void | GetRxSocketStats (SocketIOStats *socket_stats) const |
| void | GetTxSocketStats (SocketIOStats *socket_stats) const |
| void | GetRxSocketStats (SocketIOStats &socket_stats) const |
| void | GetTxSocketStats (SocketIOStats &socket_stats) const |
| int | SetMd5SocketOption (NativeSocketType fd, uint32_t peer_ip, const std::string &md5_password) |
| int | SetListenSocketMd5Option (uint32_t peer_ip, const std::string &md5_password) |
| int | SetDscpSocketOption (NativeSocketType fd, uint8_t value) |
| uint8_t | GetDscpValue (NativeSocketType fd) const |
| int | SetListenSocketDscp (uint8_t value) |
| int | SetSocketOptions (const SandeshConfig &sandesh_config) |
| int | SetKeepAliveSocketOption (int fd, const SandeshConfig &sandesh_config) |
Protected Member Functions | |
| virtual SslSession * | AllocSession (SslSocket *socket) |
Protected Member Functions inherited from SslServer | |
| boost::asio::ssl::context * | context () |
Protected Member Functions inherited from TcpServer | |
| virtual bool | AcceptSession (TcpSession *session) |
| void | set_socket_open_failure (bool flag) |
| bool | socket_open_failure () const |
| Endpoint | LocalEndpoint () const |
Private Types | |
| typedef std::map< Endpoint, XmppClientConnection * > | ConnectionMap |
| typedef std::map< xmps::PeerId, ConnectionEventCb > | ConnectionEventCbMap |
Private Member Functions | |
| void | ProcessConfigUpdate (XmppConfigManager::DiffType delta, const XmppChannelConfig *current, const XmppChannelConfig *future) |
| DISALLOW_COPY_AND_ASSIGN (XmppClient) | |
Private Attributes | |
| ConnectionMap | connection_map_ |
| ConnectionEventCbMap | connection_event_map_ |
| tbb::mutex | connection_event_map_mutex_ |
| boost::scoped_ptr< XmppConfigManager > | config_mgr_ |
| boost::scoped_ptr< LifetimeManager > | lifetime_manager_ |
| boost::scoped_ptr< DeleteActor > | deleter_ |
| bool | auth_enabled_ |
| int | tcp_hold_time_ |
Friends | |
| class | XmppSessionTest |
| class | XmppStreamMessageTest |
| class | DeleteActor |
Additional Inherited Members | |
Protected Types inherited from TcpServer | |
| typedef boost::intrusive_ptr< TcpServer > | TcpServerPtr |
| typedef boost::intrusive_ptr< TcpSession > | TcpSessionPtr |
Definition at line 22 of file xmpp_client.h.
| typedef boost::function<void(XmppChannelMux *, xmps::PeerState)> XmppClient::ConnectionEventCb |
Definition at line 33 of file xmpp_client.h.
|
private |
Definition at line 68 of file xmpp_client.h.
|
private |
Definition at line 67 of file xmpp_client.h.
| typedef boost::asio::ip::tcp::endpoint XmppClient::Endpoint |
Definition at line 24 of file xmpp_client.h.
|
explicit |
Definition at line 42 of file xmpp_client.cc.
| XmppClient::XmppClient | ( | EventManager * | evm, |
| const XmppChannelConfig * | config | ||
| ) |
|
virtual |
Definition at line 119 of file xmpp_client.cc.
|
protectedvirtual |
Implements SslServer.
Definition at line 226 of file xmpp_client.cc.
| void XmppClient::ConfigUpdate | ( | const XmppConfigData * | cfg | ) |
| size_t XmppClient::ConnectionCount | ( | ) | const |
Definition at line 222 of file xmpp_client.cc.
| size_t XmppClient::ConnectionEventCount | ( | ) | const |
Definition at line 218 of file xmpp_client.cc.
| XmppClientConnection * XmppClient::CreateConnection | ( | const XmppChannelConfig * | config | ) |
|
virtual |
Reimplemented from TcpServer.
Definition at line 135 of file xmpp_client.cc.

|
virtual |
Implements XmppConnectionManager.
Definition at line 127 of file xmpp_client.cc.
|
private |
| XmppChannel * XmppClient::FindChannel | ( | const std::string & | address | ) |
| XmppClientConnection * XmppClient::FindConnection | ( | const std::string & | address | ) |
Definition at line 231 of file xmpp_client.cc.
|
virtual |
| void XmppClient::InsertConnection | ( | XmppClientConnection * | connection | ) |
| LifetimeManager * XmppClient::lifetime_manager | ( | ) |
Definition at line 131 of file xmpp_client.cc.
| void XmppClient::NotifyConnectionEvent | ( | XmppChannelMux * | mux, |
| xmps::PeerState | state | ||
| ) |
Definition at line 208 of file xmpp_client.cc.
|
private |
| void XmppClient::RegisterConnectionEvent | ( | xmps::PeerId | id, |
| ConnectionEventCb | cb | ||
| ) |
Definition at line 195 of file xmpp_client.cc.
| void XmppClient::RemoveConnection | ( | XmppClientConnection * | connection | ) |
| int XmppClient::SetDscpValue | ( | uint8_t | value, |
| const char * | conn_id | ||
| ) |
| void XmppClient::Shutdown | ( | void | ) |
| void XmppClient::UnRegisterConnectionEvent | ( | xmps::PeerId | id | ) |
Definition at line 201 of file xmpp_client.cc.
| void XmppClient::UpdateTimeOut | ( | uint8_t | time_out, |
| const char * | conn_id | ||
| ) |
|
inline |
Definition at line 50 of file xmpp_client.h.
| uint32_t XmppClient::XmppTimeOut | ( | const char * | conn_id | ) |
|
friend |
Definition at line 65 of file xmpp_client.h.
|
friend |
Definition at line 63 of file xmpp_client.h.
|
friend |
Definition at line 64 of file xmpp_client.h.
|
private |
Definition at line 81 of file xmpp_client.h.
|
private |
Definition at line 77 of file xmpp_client.h.
|
private |
Definition at line 74 of file xmpp_client.h.
|
private |
Definition at line 75 of file xmpp_client.h.
|
private |
Definition at line 73 of file xmpp_client.h.
|
private |
Definition at line 79 of file xmpp_client.h.
|
private |
Definition at line 78 of file xmpp_client.h.
|
private |
Definition at line 82 of file xmpp_client.h.