M Mcky Member Licensed User Longtime User Aug 7, 2014 #1 Hi all. I am using the network library to connect to other devices. Basically, 2 or more tablets will receive data from a master tablet and using the asyncstreamsobject module as my app will write data of type object to the output stream. I have followed the tutorial on http://www.b4x.com/android/forum/threads/connection-server-multi-client.32555/ and it says to "You will need to manage a socket and AsyncStream object for each connection." Can anyone tell me how to do the above please? For now, I can only transfer data to one device only. Thank you.
Hi all. I am using the network library to connect to other devices. Basically, 2 or more tablets will receive data from a master tablet and using the asyncstreamsobject module as my app will write data of type object to the output stream. I have followed the tutorial on http://www.b4x.com/android/forum/threads/connection-server-multi-client.32555/ and it says to "You will need to manage a socket and AsyncStream object for each connection." Can anyone tell me how to do the above please? For now, I can only transfer data to one device only. Thank you.
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2014 #2 See this B4J example: http://www.b4x.com/android/forum/threads/b4j-cctv-example.34695/#post-203347 You should use a similar solution. Upvote 0
See this B4J example: http://www.b4x.com/android/forum/threads/b4j-cctv-example.34695/#post-203347 You should use a similar solution.
M Mcky Member Licensed User Longtime User Aug 7, 2014 #3 Yes I did follow the code but can inform me which part of code to insert the asynchstreamn.writeobject? Thanks much Last edited: Aug 7, 2014 Upvote 0
Yes I did follow the code but can inform me which part of code to insert the asynchstreamn.writeobject? Thanks much
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2014 #4 In this example the program only receives data from multiple connections. However the important thing to take from this example is how the connections map is handled. You can add another Map that maps between a client id and the AsyncStream object and it will allow you to get the correct AsyncStream object. Upvote 0
In this example the program only receives data from multiple connections. However the important thing to take from this example is how the connections map is handled. You can add another Map that maps between a client id and the AsyncStream object and it will allow you to get the correct AsyncStream object.