mirror of
https://github.com/XRPLF/rippled.git
synced 2026-04-29 15:37:57 +00:00
updates interrupt functionality to latest API spec
This commit is contained in:
@@ -256,19 +256,21 @@ void connection<config>::close(const close::status::value code,
|
||||
template <typename config>
|
||||
lib::error_code connection<config>::interrupt() {
|
||||
std::cout << "connection::interrupt" << std::endl;
|
||||
/*return transport_type::inturrupt(
|
||||
return transport_type::interrupt(
|
||||
lib::bind(
|
||||
&type::handle_inturrupt,
|
||||
&type::handle_interrupt,
|
||||
type::shared_from_this()
|
||||
)
|
||||
);*/
|
||||
);
|
||||
return lib::error_code();
|
||||
}
|
||||
|
||||
|
||||
template <typename config>
|
||||
void connection<config>::handle_interrupt() {
|
||||
m_handler->on_interrupt(type::shared_from_this());
|
||||
if (m_interrupt_handler) {
|
||||
m_interrupt_handler(m_connection_hdl);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -54,9 +54,14 @@ endpoint<connection,config>::create_connection() {
|
||||
|
||||
//
|
||||
con->set_handle(w);
|
||||
con->set_handler(m_default_handler);
|
||||
|
||||
con->set_handler(m_default_handler);
|
||||
|
||||
// Copy default handlers from the endpoint
|
||||
con->set_open_handler(m_open_handler);
|
||||
con->set_termination_handler(
|
||||
con->set_interrupt_handler(m_interrupt_handler);
|
||||
|
||||
con->set_termination_handler(
|
||||
lib::bind(
|
||||
&type::remove_connection,
|
||||
this,
|
||||
|
||||
Reference in New Issue
Block a user