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

unetsocket_receive should check for protocol number before returning a msg #85

Open
mchitre opened this issue Feb 13, 2023 · 2 comments
Assignees
Labels

Comments

@mchitre
Copy link
Member

mchitre commented Feb 13, 2023

Currently the example doesn't check protocol number, and so for larger datagrams, user will see each fragment, which he should not.

@notthetup
Copy link
Collaborator

Shouldn't this happen inside unetsocket_receive? The user (in this case rxdata.c) should just get all the Datagrams with the protocol set to DATA or >=USER. And if the socket is bound to a specific protocol, then ONLY that protocol. But that filtering should be done inside the unetsocket_receive.

@mchitre
Copy link
Member Author

mchitre commented Mar 13, 2023

Yes, correct

@notthetup notthetup changed the title rxdata.c sample should check for protocol number before showing user the data unetsocket_receive should check for protocol number before showing user the data Mar 13, 2023
@notthetup notthetup changed the title unetsocket_receive should check for protocol number before showing user the data unetsocket_receive should check for protocol number before returning a msg Mar 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants