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


| Classes | |
| class | DeleteActor | 
| Public Member Functions | |
| SandeshServer (EventManager *evm, const SandeshConfig &config) | |
| virtual | ~SandeshServer () | 
| virtual bool | Initialize (short port, const std::string &ip="0.0.0.0") | 
| virtual TcpSession * | CreateSession () | 
| void | Initiate () | 
| void | Shutdown () | 
| virtual void | SessionShutdown () | 
| LifetimeManager * | lifetime_manager () | 
| LifetimeActor * | deleter () | 
| int | lifetime_mgr_task_id () | 
| SandeshConnection * | FindConnection (const Endpoint &peer_addr) | 
| void | RemoveConnection (SandeshConnection *connection) | 
| virtual bool | DisableSandeshLogMessages () const | 
| virtual bool | ReceiveResourceUpdate (SandeshSession *session, bool rsc) | 
| virtual bool | ReceiveSandeshMsg (SandeshSession *session, const SandeshMessage *msg, bool resource)=0 | 
| virtual bool | ReceiveSandeshCtrlMsg (SandeshStateMachine *state_machine, SandeshSession *session, const Sandesh *sandesh) | 
| virtual void | DisconnectSession (SandeshSession *session) | 
| size_t | ConnectionsCount () | 
| int | AllocConnectionIndex () | 
| void | FreeConnectionIndex (int) | 
|  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) | 
| 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) | 
| virtual bool | AcceptSession (TcpSession *session) | 
| int | session_writer_task_id () const | 
| int | session_reader_task_id () const | 
|  Protected Member Functions inherited from SslServer | |
| boost::asio::ssl::context * | context () | 
|  Protected Member Functions inherited from TcpServer | |
| void | set_socket_open_failure (bool flag) | 
| bool | socket_open_failure () const | 
| Endpoint | LocalEndpoint () const | 
| Private Types | |
| typedef boost::ptr_map< boost::asio::ip::tcp::endpoint, SandeshConnection > | SandeshConnectionMap | 
| typedef boost::ptr_container_detail::ref_pair< boost::asio::ip::basic_endpoint< boost::asio::ip::tcp >, SandeshConnection *const > | SandeshConnectionPair | 
| Private Member Functions | |
| bool | Compare (const Endpoint &peer_addr, const SandeshConnectionPair &) const | 
| DISALLOW_COPY_AND_ASSIGN (SandeshServer) | |
| Private Attributes | |
| SandeshConnectionMap | connection_ | 
| boost::dynamic_bitset | conn_bmap_ | 
| int | sm_task_id_ | 
| int | session_reader_task_id_ | 
| int | lifetime_mgr_task_id_ | 
| boost::scoped_ptr< LifetimeManager > | lifetime_manager_ | 
| boost::scoped_ptr< DeleteActor > | deleter_ | 
| tbb::mutex | mutex_ | 
| Static Private Attributes | |
| static const int | kMaxInitRetries = 5 | 
| static const std::string | kSessionReaderTask = "io::ReaderTask" | 
| static const std::string | kStateMachineTask = "sandesh::SandeshStateMachine" | 
| static const std::string | kLifetimeMgrTask = "sandesh::LifetimeMgr" | 
| static bool | task_policy_set_ = false | 
| Friends | |
| class | DeleteActor | 
| Additional Inherited Members | |
|  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 | 
|  Protected Types inherited from TcpServer | |
| typedef boost::intrusive_ptr< TcpServer > | TcpServerPtr | 
| typedef boost::intrusive_ptr< TcpSession > | TcpSessionPtr | 
Definition at line 31 of file sandesh_server.h.
| 
 | private | 
Definition at line 79 of file sandesh_server.h.
| 
 | private | 
Definition at line 82 of file sandesh_server.h.
| 
 | explicit | 
| 
 | virtual | 
| 
 | protectedvirtual | 
Reimplemented from TcpServer.
Definition at line 237 of file sandesh_server.cc.

| int SandeshServer::AllocConnectionIndex | ( | ) | 
Definition at line 148 of file sandesh_server.cc.
| 
 | protectedvirtual | 
Implements SslServer.
Definition at line 221 of file sandesh_server.cc.

| 
 | private | 
Definition at line 205 of file sandesh_server.cc.
| 
 | inline | 
Definition at line 57 of file sandesh_server.h.
| 
 | virtual | 
Reimplemented from TcpServer.
Definition at line 174 of file sandesh_server.cc.

| LifetimeActor * SandeshServer::deleter | ( | ) | 
Definition at line 277 of file sandesh_server.cc.
| 
 | inlinevirtual | 
Reimplemented from TcpServer.
Definition at line 48 of file sandesh_server.h.
| 
 | private | 
| 
 | inlinevirtual | 
Definition at line 56 of file sandesh_server.h.
| SandeshConnection * SandeshServer::FindConnection | ( | const Endpoint & | peer_addr | ) | 
| void SandeshServer::FreeConnectionIndex | ( | int | id | ) | 
Definition at line 159 of file sandesh_server.cc.
| 
 | virtual | 
| void SandeshServer::Initiate | ( | ) | 
| LifetimeManager * SandeshServer::lifetime_manager | ( | ) | 
Definition at line 281 of file sandesh_server.cc.
| int SandeshServer::lifetime_mgr_task_id | ( | ) | 
Definition at line 118 of file sandesh_server.cc.
| 
 | inlinevirtual | 
Definition at line 50 of file sandesh_server.h.
| 
 | virtual | 
| 
 | pure virtual | 
| void SandeshServer::RemoveConnection | ( | SandeshConnection * | connection | ) | 
| 
 | inlineprotected | 
Definition at line 66 of file sandesh_server.h.
| 
 | inlineprotected | 
Definition at line 65 of file sandesh_server.h.
| 
 | virtual | 
| void SandeshServer::Shutdown | ( | void | ) | 
Definition at line 200 of file sandesh_server.cc.
| 
 | friend | 
Definition at line 76 of file sandesh_server.h.
| 
 | private | 
Definition at line 86 of file sandesh_server.h.
| 
 | private | 
Definition at line 85 of file sandesh_server.h.
| 
 | private | 
Definition at line 91 of file sandesh_server.h.
| 
 | staticprivate | 
Definition at line 72 of file sandesh_server.h.
| 
 | staticprivate | 
Definition at line 69 of file sandesh_server.h.
| 
 | staticprivate | 
Definition at line 70 of file sandesh_server.h.
| 
 | staticprivate | 
Definition at line 71 of file sandesh_server.h.
| 
 | private | 
Definition at line 90 of file sandesh_server.h.
| 
 | private | 
Definition at line 89 of file sandesh_server.h.
| 
 | private | 
Definition at line 93 of file sandesh_server.h.
| 
 | private | 
Definition at line 88 of file sandesh_server.h.
| 
 | private | 
Definition at line 87 of file sandesh_server.h.
| 
 | staticprivate | 
Definition at line 73 of file sandesh_server.h.