B4J Question AsyncStreams threading question

wl

Well-Known Member
Licensed User
Longtime User
Hi,

I'm not entirey sure I understand how the AsyncStreams work internally.

I'm making a Server which can server multiple clients (such as in: http://www.b4x.com/android/forum/threads/asyncstreams-tutorial.7669/#content): will EVERY connecting client create two threads: one for reading and one for writing ? Or: will there only be ONE reading and ONE writing thread for all clients ?

I understand that in _NewData for example I can call RaiseEventFromDifferentThread to have code being executed on the main thread ?

If I use RaiseEvent in for example _NewData: the code will be executed in the reading thread created for the given client ?

Thanks !
 
Top