Archive 17/01/2023.

Send EventData on Disconnected and Failed

dev4fun

Its posible send an event data on events “E_SERVERDISCONNECTED” and “E_CONNECTFAILED”? Im modifying the Urho3D::Network, and I want customize this events to send a code to client side. This way when client side receives the event of “CONNECTFAILED”, I can know for what reason this happens.

Example:
Wrong password, then I send event : E_CONNECTFAILED with the code 400
Client will receive event, and the code 400, this way I can show a text to inform game that was disconnected because of inserted a wrong password.

Thanks.

Eugene

You could pass as much data as you need with any event.
Just use appropritate SendEvent signature

dev4fun

Hmm sure. 'll try this, thanks for ur help.