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

Consider providing a future-based send method #35

Open
cliffg-softwarelibre opened this issue Jul 6, 2019 · 2 comments
Open

Consider providing a future-based send method #35

cliffg-softwarelibre opened this issue Jul 6, 2019 · 2 comments
Assignees
Labels
design enhancement Software design improvement, improving genericity

Comments

@cliffg-softwarelibre
Copy link
Member

An alternative to output queues for outgoing data is to let applications send a message or buffer one at a time with some form of notification when each write completes. This would require a send method that returns a std::future, which resolves when the write completes. Discussion is needed as to whether the application would be completely responsible for buffer lifetime management, or whether we require some form of reference count or move (or similar) for the output buffer.

Chops Net IP would need to track whether a write is in progress or not. The library should prevent applications from more than one write at a time (on a given connection).

@cliffg-softwarelibre cliffg-softwarelibre added the design enhancement Software design improvement, improving genericity label Jul 6, 2019
@RAgerone
Copy link
Member

RAgerone commented Nov 5, 2019

Here's the documentation for future. I'd be interested in picking up this task. https://en.cppreference.com/w/cpp/thread/future

@cliffg-softwarelibre
Copy link
Member Author

This is related to #11 and #10. I'll write a discussion in the team area to get us started (this will be a discussion between me, Nathan, and Roxanne).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement Software design improvement, improving genericity
Projects
None yet
Development

No branches or pull requests

2 participants