Skip to content

Commit

Permalink
registering the listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
anutosh491 committed Mar 27, 2024
1 parent b2e2234 commit 85df9f3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/xeus-zmq/xclient_zmq.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,12 @@ namespace xeus
void register_shell_listener(const listener& l);
void register_control_listener(const listener& l);
void register_iopub_listener(const listener& l);
void register_heartbeat_listener(const listener& l);

void notify_shell_listener(xmessage msg);
void notify_control_listener(xmessage msg);
void notify_iopub_listener(xmessage msg);
void notify_heartbeat_listener(xmessage msg);

std::size_t iopub_queue_size() const;
std::optional<xmessage> pop_iopub_message();
Expand Down
10 changes: 10 additions & 0 deletions src/xclient_zmq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ namespace xeus
p_client_impl->register_iopub_listener(l);
}

void xclient_zmq::register_heartbeat_listener(const listener& l)
{
p_client_impl->register_heartbeat_listener(l);
}

void xclient_zmq::notify_shell_listener(xmessage msg)
{
p_client_impl->notify_shell_listener(std::move(msg));
Expand All @@ -73,6 +78,11 @@ namespace xeus
p_client_impl->notify_iopub_listener(std::move(msg));
}

void xclient_zmq::notify_heartbeat_listener(xmessage msg)
{
p_client_impl->notify_heartbeat_listener(std::move(msg));
}

std::size_t xclient_zmq::iopub_queue_size() const
{
return p_client_impl->iopub_queue_size();
Expand Down

0 comments on commit 85df9f3

Please sign in to comment.