Closed hlf20010508 closed 1 month ago
You are taking SocketRef
by ref whereas you should take it by value:
pub fn disconnect(socket: &SocketRef) {}
Vs pub fn disconnect(socket: SocketRef) {}
It works. Thanks for your help.
By the way, you missed code block end "```" here. https://github.com/Totodore/socketioxide/blob/9415e058ecd6aa509f6199f35d0097ee81768e14/socketioxide/src/socket.rs#L259
Describe the bug
on_disconnection
can accept closures but not non anonymous functions.The function is called
disconnect
. The error isTo Reproduce
Expected behavior The example in doc says
But actually this doesn't work.
Versions (please complete the following information):
Additional context I don't know if there's something that I missed.