.. _program_listing_file_BackendLibfabric_SendSocket.hpp: Program Listing for File SendSocket.hpp ======================================= |exhale_lsh| :ref:`Return to documentation for file ` (``BackendLibfabric/SendSocket.hpp``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp #ifndef NETIO3BACKEND_BACKENDLIBFABRIC_SENDSOCKET_HPP #define NETIO3BACKEND_BACKENDLIBFABRIC_SENDSOCKET_HPP #include #include #include #include #include "BaseSocket.hpp" #include "Helpers.hpp" #include "netio3-backend/Netio3Backend.hpp" namespace netio3::libfabric { class SendSocket : public BaseSocket { public: [[nodiscard]] const EndPointAddress& get_address() const { return m_addr; } protected: SendSocket(EndPointAddress address, NetworkMode mode, fid_fabric* fabric, fid_domain* domain); void init(); [[nodiscard]] NetioStatus send_data(iovec data, fid_mr* mr, std::uint64_t key) const { ZoneScoped; return send_data(std::span{&data, 1}, std::span{&mr, 1}, key); } [[nodiscard]] NetioStatus send_data(std::span data, std::span mrs, std::uint64_t key) const; private: [[nodiscard]] static Endpoint create_endpoint(const EndPointAddress& address, NetworkMode mode, fid_fabric* fabric, fid_domain* domain); [[nodiscard]] static FiInfoUniquePtr get_info(const EndPointAddress& address, NetworkMode mode); static void open_cq(const EndPointAddress& address, Endpoint& ep, fid_domain* domain); EndPointAddress m_addr; ConnectionParameters m_conn_parameters{}; tbb::concurrent_queue m_available_buffers; }; template concept SendSocketConcept = std::derived_from; } // namespace netio3::libfabric #endif // NETIO3BACKEND_BACKENDLIBFABRIC_SENDSOCKET_HPP