Program Listing for File CqReactor.hpp
↰ Return to documentation for file (BackendLibfabric/CqReactor.hpp
)
#ifndef NETIO3BACKEND_BACKENDLIBFABRIC_CQREACTOR_HPP
#define NETIO3BACKEND_BACKENDLIBFABRIC_CQREACTOR_HPP
#include <cstdint>
#include <rdma/fabric.h>
#include "netio3-backend/Netio3Backend.hpp"
#include "ReceiveSocket.hpp"
#include "SendSocket.hpp"
namespace netio3::libfabric {
class CqReactor
{
public:
CqReactor(fid_fabric* fabric, OnDataCb on_data_cb);
template<SendSocketConcept SocketType>
[[nodiscard]] std::vector<std::uint64_t> on_send_socket_cq_event(SocketType& ssocket) const;
void on_recv_socket_cq_event(ReceiveSocket& rsocket) const;
private:
fid_fabric* m_fabric{
nullptr};
OnDataCb m_on_data_cb{};
};
} // namespace netio3::libfabric
#endif // NETIO3BACKEND_BACKENDLIBFABRIC_CQREACTOR_HPP