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

Additions to port.c #1003

Open
bettio opened this issue Dec 30, 2023 · 0 comments
Open

Additions to port.c #1003

bettio opened this issue Dec 30, 2023 · 0 comments

Comments

@bettio
Copy link
Collaborator

bettio commented Dec 30, 2023

Add the following function to port.c in order to simplify port development:

bar_t port_send_reply(const GenMessage *gen_message, term reply, GlobalContext *global);

The following function might be added too, so we completely hide underlying protocol:

size_t port_reply_size(); // returns the size of `{Ref, _}` tuple.

As an alternative following function might be added, assuming that we can prepare a fragment that is ready to be sent just later.

foo_t port_prepare_reply(size_t reply_size, GlobalContext *global);

Also a very convenient API might be added to port.c:

bar_t port_send_ok_reply(const GenMessage *gen_message)
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

No branches or pull requests

1 participant