Open garyo opened 6 years ago
I don't think there is a such method ("on_authenticate"). If you wanna catch "authenticate" message, you would need to listen on it, like on("authenticate", callback)
Hi @e-tang,
Is there any way to call on("authenticate", callback) before connection is established? Otherwise we have a race, right?
Hi @bufistov
I am not quite sure what you meant here, but how could you start authenticating without establishing a connection first?
You can start the authentication process after the "on _connect" is called.
Or You can have a look my implementation tyo-mq client for python in a pub/sub way.
My server emits a message when a client connects, "authenticate". The client should respond. But with socketIO-client, if I connect and then wait, I never get the "authenticate" message even though the server sent it as usual (I checked with wireshark). I have to send something first from the client, and then send "authenticate" from the server after the server receives that first message from the client.
Is there something I should do to fix this on my side?