vukoye / xmpp_dart

Lightweight XMPP client library written in Dart
Apache License 2.0
83 stars 64 forks source link

How can i establish XMPP server connection in background?? #72

Open kajalgondaliya opened 2 years ago

kajalgondaliya commented 2 years ago

Currently i am able to make connection via normal connection.connect() method but it blocks my app UI for certain seconds which is not the best thing, because XMPP is still trying to establish connection with server which uses the MAIN THREAD. This is the exact issue of which i am talking about.

How can i offload the establish connection process to some different isolates and i am not adhere to get its response back. All i want is it should execute est. connection code in the background and not on the main thread.

If we've any workaround for this then it will not block UI because main thread is free to render UI.