How do you use same ClientSocket on different screens?

Thank you for clarification.
Sometimes it is not so easy to distinguish the fine differences in the terms, especially
for beginners (in a not native language)!

Regarding my original problem (ClientSocket on multi/virtual screens) as conclusion,
open sockets of a screen can not be accessed on other screens/virtual screens, right ?
What else ?

Dear @roty,
as you can see from my profile, I'm not of english native language, too, and I'm not using the translator because I want to keep my mind alive :grin:

That said, back to your first question, yes, there are many good reasons to avoid (when possible) the use of multiple Screens.
As @ABG has perfectly said: by activating another Screen (or returning back) is the same as launching another program (app), therefore

  • the variables, though "global", are lost and the unique way to pass them across Screens is to store/fetch them on TinyDB.
  • the communications (BT, WiFi, Serial,...) are lost and they have to be restored at each Screen switch (as far as the BT is concerned, I posted a topic where I've been able to maintain a BT comm's between Screens by using the extension "Itoo" by @Kumaraswamy that works in background, but honestly it's easier to use Virtual Screens instead)

So, the rule of thumb is: when you plan to develop a new app that uses some kind of communication (i.e. BT) or you need to pass many data between the Screens, you better have to consider the use of Virtual screens.

All the best !

Thank you very much for your explanations and time!

Sometimes I'm thinking a bit more complicated as necessary . Things can be easy,
provided one knows how it works behind surface.

I'm sure we meet us again if I have the next question :innocent:.

Regards

Robert

1 Like