25 lines
806 B
C++
25 lines
806 B
C++
#pragma once
|
|
|
|
#include "port_impl_base.hpp"
|
|
#include "port_types.hpp"
|
|
|
|
#define FMT_HEADER_ONLY
|
|
#include <fmt/format.h>
|
|
#include <fmt/ranges.h>
|
|
|
|
template <typename Port, typename Callback> class PortImpl<port_types_e::DEALER, Port, Callback> : public PortImplBase<Port, Callback> {
|
|
public:
|
|
PortImpl(const Port *port, zmq::context_t &zmq_ctx, const std::string &endpoint, Callback &&callback)
|
|
: PortImplBase<Port, Callback>(port, zmq_ctx, endpoint, std::forward<Callback>(callback)) {}
|
|
|
|
// Send to socket depending on implementation
|
|
void send(const std::string &addr, const msgpack::sbuffer &data) const override {};
|
|
|
|
private:
|
|
void listen__(std::stop_token st) const override {
|
|
while (!st.stop_requested()) {
|
|
std::this_thread::sleep_for(std::chrono::milliseconds(100u));
|
|
}
|
|
}
|
|
};
|