Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Experimental Message & Socket API #327

Closed
wants to merge 9 commits into from
Closed

Conversation

rbx
Copy link
Member

@rbx rbx commented Dec 17, 2020

  • Add fair::mq::Msg class that is move-only and can contain multiple buffers. Resolves Cleanup Channel/Socket #101.
  • Add corresponding transfer APIs that take ownership over the Msg and introduce new return value. Resolves Offer better Send/Receive API #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
};

@dennisklein dennisklein changed the title [WIP] Add Experimental Message & Socket API Add Experimental Message & Socket API Mar 24, 2021
@dennisklein dennisklein marked this pull request as draft March 24, 2021 14:57
@dennisklein dennisklein force-pushed the dev branch 6 times, most recently from 39b5f74 to a1e5962 Compare August 12, 2022 00:26
@rbx rbx closed this Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant