FairMQ icon indicating copy to clipboard operation
FairMQ copied to clipboard

Add Experimental Message & Socket API

Open rbx opened this issue 5 years ago • 0 comments

  • Add fair::mq::Msg class that is move-only and can contain multiple buffers. Resolves #101.
  • Add corresponding transfer APIs that take ownership over the Msg and introduce new return value. Resolves #85. The return value fair::mq::TransferResult consists of:
enum class TransferCode : int
{
    success = 0,
    error = -1,
    timeout = -2,
    interrupted = -3
};

struct TransferResult
{
    size_t nbytes; // number of bytes transferred
    TransferCode code; // see above class
    std::optional<Msg> msg; // optional Msg, e.g. if transfer failed or timed out
};

rbx avatar Dec 17 '20 10:12 rbx