11 #ifndef __SANDESH_CONNECTION_H__
12 #define __SANDESH_CONNECTION_H__
14 #include <boost/asio/ip/tcp.hpp>
30 typedef boost::asio::ip::tcp::endpoint
Endpoint;
32 int task_instance,
int task_id);
73 const SandeshHeader &header,
const std::string sandesh_name,
74 const uint32_t header_offset) = 0;
102 int task_instance,
int task_id);
109 const SandeshHeader &header,
const std::string sandesh_name,
110 const uint32_t header_offset);
120 boost::scoped_ptr<DeleteActor>
deleter_;
126 #endif // __SANDESH_CONNECTION_H__
virtual LifetimeManager * lifetime_manager()
virtual ~SandeshServerConnection()
boost::scoped_ptr< DeleteActor > deleter_
virtual bool ProcessResourceUpdate(bool res)
SandeshConnection(const char *prefix, TcpServer *server, Endpoint endpoint, int task_instance, int task_id)
SandeshSession * session() const
void AcceptSession(SandeshSession *session)
virtual LifetimeActor * deleter()=0
LifetimeRef< SandeshServerConnection > server_delete_ref_
SandeshServerConnection(TcpServer *server, Endpoint endpoint, int task_instance, int task_id)
DISALLOW_COPY_AND_ASSIGN(SandeshConnection)
boost::asio::ip::tcp::endpoint Endpoint
std::string StateName() const
virtual bool ProcessSandeshMessage(const SandeshMessage *msg, bool resource)=0
virtual bool ProcessSandeshCtrlMessage(const std::string &msg, const SandeshHeader &header, const std::string sandesh_name, const uint32_t header_offset)=0
virtual void ProcessDisconnect(SandeshSession *sess)=0
virtual void ManagedDelete()=0
void SetAdminState(bool down)
void set_session(SandeshSession *session)
SandeshSession * session_
virtual LifetimeActor * deleter()
friend class SandeshServerStateMachineTest
virtual ~SandeshConnection()
DISALLOW_COPY_AND_ASSIGN(SandeshServerConnection)
virtual bool ProcessResourceUpdate(bool res)
int GetTaskInstance() const
virtual LifetimeManager * lifetime_manager()=0
virtual void ProcessDisconnect(SandeshSession *session)
virtual void ManagedDelete()
virtual bool ProcessSandeshMessage(const SandeshMessage *msg, bool resource)
SandeshStateMachine * state_machine() const
virtual bool ReceiveMsg(const std::string &msg, SandeshSession *session)
virtual bool ProcessSandeshCtrlMessage(const std::string &msg, const SandeshHeader &header, const std::string sandesh_name, const uint32_t header_offset)
bool SendSandesh(Sandesh *snh)
boost::scoped_ptr< SandeshStateMachine > state_machine_