-
Notifications
You must be signed in to change notification settings - Fork 19
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
Setting of the verdict #10
Comments
Hey @vorner and @chifflier, take a look at these changes: sharksforarms/nfqueue-rs@improvements...sharksforarms:issue-#10 Let me know what you think! |
I know it's mostly what I suggested that 1.5 years ago, but I wonder if it was the best idea. The downsides I see:
Though I'd be glad to see the changes in either way 😇, these are just some points where it could not be the best solution (it's at least some solution). |
Thanks for the quick response @vorner ! |
Interesting to note, I tried not setting a verdict and got this on stdout |
Well, the use case I have in mind is to first inspect the packet (including the content) and decide that:
|
The current API has some drawbacks around the setting of verdict:
Is it possible to pass owned (not borrowed) message to the callback and consume it during verdicting? And maybe go so far as to panic (or at least warn) if the message is destroyed without getting a verdict?
If the problem is the buffer of data, it could be passed to the callback as two parameters ‒ one Message, that'd contain the metadata and the ability to verdict, and borrowed slice of bytes as the payload.
The text was updated successfully, but these errors were encountered: