Closed finedays closed 7 years ago
Pass the server
to the handler and return a function. Basic JS function factory with argument binding.
Thank you for stating the obvious 💯 Even late night dumbness is not an excuse sometimes :) Thanks once again.
No worries.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Hi fellas,
I am trying to implement a logic where when one client is connected to the socket and emits message, the server publishes this to another subscribed client.
I managed to do that if I am using the onMessage option directly while registering the plugin, but if I am trying to use external function, I cannot access the server.publish method.
The handler is:
I am skipping the other parts of the code, as I think it is not relevant.
What am I missing?