How to get events using MLAPI?

Hello, I’m trying to get events such as connection failed and the reason why (wrong connectiondata/password, no server found, etc.)

And then allowing the client to be able to see these errors

I’ve tried using sockettasks and either I’m not using them correctly or they don’t provide the functionality I’m looking for

If anyone could help, it’d be greatly appreciated!!

@TwoTen

EDIT: also if there is any documentation regarding this, if you could link it! I couldn’t find any except some commits which I couldn’t figure out

I tried using sockettasks but I wasn’t sure how to use them and/or I don’t believe they give off when a client is disconnected due to wrong password

There are events in the NetworkingManager for you to use. However, there is no way to extract why the connection failed as most transports do not support this feature.

Yup I just made a basic code that detects when the client SHOULD timeout (obv match the value with what you set in the transport) and then if the client is disconnected (theres a callback for this) check when they were disconnected, before the timeout or after

if it was before the timeout, we can chalk it to the wrong password
if it was after the timeout, then it was due to no connection or taking too long to respond