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

Parameter address should be renamed to avoid confusion. Parameter alias should hint at its use. #368

Open
Idawid opened this issue May 25, 2023 · 0 comments

Comments

@Idawid
Copy link

Idawid commented May 25, 2023

  1. Parameters address in send() and recv() should be renamed.
  2. Parameter alias should hint at the socket function. Various functions accept alias as the parameter, but it has VERY different use.

Explanation:
osbrain follows the standard where alias refers to the alias of the socket.
On the server-side:

  • bind() - great, follows the standard Linux implementation. alias refers to the server socket used for handling connections
    Newly created sockets for read/write are omitted (great), user doesn't have to be exposed to what accept() normally does

On the client-side:

  • connect() - okay, parameter alias refers to the socket of the client, parameter server- address the server is bound to. I think alias should be mandatory.
  • send() - standard is broken. address refers to the socket of the client (and that in itself is good, as per the standard low-level implementations).
  • recv() - standard is broken again.
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