3 #include "../acl_cpp_define.hpp" 4 #include "../stream/aio_socket_stream.hpp" 28 virtual void destroy(
void) = 0;
48 bool open(
const char* addr,
int conn_timeout,
int rw_timeout);
76 void set_host(
const char* host);
93 bool get_ns_addr(
string& out)
const;
100 bool get_server_addr(
string& out)
const;
110 bool timeout_callback(
void);
113 void close_callback(
void);
116 bool read_wakeup(
void);
119 bool read_callback(
char* data,
int len);
123 bool message_await(
void);
141 virtual bool on_open(
void) = 0;
155 struct sockaddr_storage ns_addr_;
156 struct sockaddr_storage serv_addr_;
162 bool open_done(
void);
165 bool handle_ssl_handshake(
void);
168 int handle_data(
char* data,
int len);
virtual void on_connect_timeout(void)
virtual bool on_header(const mqtt_header &)
aio_socket_stream * get_conn(void) const
virtual void on_ns_failed(void)
virtual bool on_read_timeout(void)
sslbase_conf * get_ssl_conf(void) const
virtual void on_connect_failed(void)
struct ACL_ASTREAM_CTX ACL_ASTREAM_CTX
virtual void on_disconnect(void)