4 #ifndef SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_TCP_H_
5 #define SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_TCP_H_
6 #include <boost/asio.hpp>
7 #include <boost/asio/buffer.hpp>
15 #include <agent_types.h>
52 void SendMsg(u_int8_t *buf, std::size_t len);
54 bool RecvMsg(
const u_int8_t *buf, std::size_t len);
114 const std::string
server();
117 const boost::asio::ip::tcp::endpoint &
server_ep()
const;
139 #endif //SRC_VNSW_AGENT_OVS_TOR_AGENT_OVSDB_CLIENT_OVSDB_CLIENT_TCP_H_
int ha_stale_route_interval() const
boost::asio::ip::tcp::endpoint server_ep_
boost::asio::const_buffer Buffer
boost::function< bool(const uint8_t *, size_t)> ReceiveCallback
bool RecvMsg(const u_int8_t *buf, std::size_t len)
OvsdbClientSession * FindSession(Ip4Address ip, uint16_t port)
boost::asio::ip::tcp::socket Socket
DISALLOW_COPY_AND_ASSIGN(OvsdbClientTcp)
boost::asio::ip::address IpAddress
virtual const int GetHeaderLenSize()
virtual uint16_t remote_port() const
OvsdbClientSession * NextSession(OvsdbClientSession *session)
virtual const int GetMaxMessageSize()
boost::asio::ip::tcp::socket Socket
const boost::system::error_code & ovsdb_close_reason() const
virtual ~OvsdbClientTcpSessionReader()
void AddSessionInfo(SandeshOvsdbClient &client)
bool ProcessSessionEvent(OvsdbSessionEvent event)
virtual int reader_task_id() const
OvsdbClientTcpSessionReader * reader_
boost::asio::const_buffer Buffer
const std::string server()
int keepalive_interval() const
void set_status(std::string status)
virtual ~OvsdbClientTcpSession()
virtual TcpSession * AllocSession(Socket *socket)
const std::string protocol()
virtual void OnRead(Buffer buffer)
void OnSessionEvent(TcpSession *session, TcpSession::Event event)
virtual int MsgLength(Buffer buffer, int offset)
boost::asio::ip::address_v4 Ip4Address
static const uint32_t TcpReconnectWait
virtual Ip4Address remote_ip() const
const boost::asio::ip::tcp::endpoint & server_ep() const
void EnqueueEvent(TcpSession::Event event)
OvsdbClientTcp(Agent *agent, IpAddress tor_ip, int tor_port, IpAddress tsn_ip, int keepalive_interval, int ha_stale_route_interval, OvsPeerManager *manager)
DISALLOW_COPY_AND_ASSIGN(OvsdbClientTcpSessionReader)
WorkQueue< OvsdbSessionEvent > * session_event_queue_
KSyncObjectManager * ksync_obj_manager()
Timer * client_reconnect_timer_
virtual ~OvsdbClientTcp()
OvsdbClientTcpSession(Agent *agent, OvsPeerManager *manager, TcpServer *server, Socket *sock, bool async_ready=true)
void SendMsg(u_int8_t *buf, std::size_t len)
static int ovsdb_io_task_id_
DISALLOW_COPY_AND_ASSIGN(OvsdbClientTcpSession)
static const int kMaxMessageSize
ConnectionStateTable * connection_table()
OvsdbClientTcpSessionReader(TcpSession *session, ReceiveCallback callback)