Class Sender

Class Documentation

class Sender

Class containing functions for sending data over a network.

Public Functions

inline explicit Sender(ActiveEndpoint &endpoint)

Constructs a Sender object.

The constructor takes a reference to an ActiveEndpoint object.

Parameters:

endpoint – The active endpoint object handling the connection

inline NetioStatus send_data(iovec data, fid_mr *mr, std::uint64_t key, fi_addr_t addr) const

Sends data using the Libfabric library.

Helper function to send a single iovec. See send_data for more information.

Parameters:
  • data – The data to be sent

  • mr – The memory region associated with the data

  • key – The key associated with the memory region

  • addr – The address to send the data to (used for connectionless endpoints)

Returns:

NetioStatus indicating the success or failure of the send operation

NetioStatus send_data(std::span<const iovec> data, std::span<fid_mr*> mrs, std::uint64_t key, fi_addr_t addr) const

Sends data using the using libfabric.

This function sends data using fi_sendmsg. It takes data as a span of iovecs. The data must already be in a registered memory region. The key passed in will be stored as context on the completion event to be provided in the on_send_completed callback. It returns a NetioStatus indicating the success or failure of the send operation.

Parameters:
  • data – The span of iovec structures representing the data to be sent

  • mrs – The memory regions associated with the data

  • key – The key associated with the send operation

  • addr – The address to send the data to (used for connectionless endpoints)

Returns:

NetioStatus indicating the success or failure of the send operation