-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
New ChannelMessageHandlers class (fixes issue #892) #894
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, though I'm not a big fan of introduction of even more global data structures.
I would like to avoid those static maps and use a class instance instead, but that requires much more work and huge changes everywhere. But I'll think about it and will try to change it in the future. I won't forget. |
@nazar-pc approved? XD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a heavy ❤️ (sorry 🦀, I'll fix you, I promise)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
make fuzzer
no longer works (missing target in meson.build) #895Details
Introduce a new
ChannelMessageHandlers
in worker that handles theChannel
andPayloadChannel
request/notification handlers.Entities that wish to receive requests/notifications from Node/Rust must register themselves in their class constructor and unregister in their destructors.
The
RegisterHandler()
function is smart and unregisters the entity from all maps in case itsid
was already present in any of them.TODO
channelRequestHandlers
object field in theWorker
dump output (I was not able to figure out how to compare the new obtained objects in Rust land).