M micro Well-Known Member Licensed User Longtime User May 26, 2015 #1 Hi to all I have 60 device configured as a server, now I, from the pc to connect with them (writing and reading) can I create multiple client connections for each device and thus have independence in the connections? Each connection must update a data table for each device. With a single connection I lose time to interrogate a device at a time. It's possibile with B4j? Thanks
Hi to all I have 60 device configured as a server, now I, from the pc to connect with them (writing and reading) can I create multiple client connections for each device and thus have independence in the connections? Each connection must update a data table for each device. With a single connection I lose time to interrogate a device at a time. It's possibile with B4j? Thanks
ArminKH Well-Known Member May 26, 2015 #2 yes you can i think you should following this steps 1-At first you must register your users with specific ID on your Online Database 2-build your server by b4j 3-connect to server from b4a 4-if connected then you can send your user id to server 5-if ID recieved to server side then you can select and update your online data base 4 Relevant ID now any other user on your server can recieve updated data i think this steps are correct but @Erel can said this is correct and is best way or not regards Upvote 0
yes you can i think you should following this steps 1-At first you must register your users with specific ID on your Online Database 2-build your server by b4j 3-connect to server from b4a 4-if connected then you can send your user id to server 5-if ID recieved to server side then you can select and update your online data base 4 Relevant ID now any other user on your server can recieve updated data i think this steps are correct but @Erel can said this is correct and is best way or not regards
Erel B4X founder Staff member Licensed User Longtime User May 27, 2015 #3 micro said: can I create multiple client connections for each device and thus have independence in the connections? Click to expand... Yes. See the CCTV example (the example in the second post). Though I recommend you to avoid working with sockets and create a real server. Maybe a web socket server like this one: https://www.b4x.com/android/forum/threads/40272/#content Upvote 0
micro said: can I create multiple client connections for each device and thus have independence in the connections? Click to expand... Yes. See the CCTV example (the example in the second post). Though I recommend you to avoid working with sockets and create a real server. Maybe a web socket server like this one: https://www.b4x.com/android/forum/threads/40272/#content
M micro Well-Known Member Licensed User Longtime User Jun 25, 2015 #5 Excuse me Erel antother question (a bit of confusion), I decided for ease to use the example of CCTV. As I said, the devices are server and the descktop application (b4j) is the client, in b4j i have to create n client for ever device and use different port? Code: Copy Private client_1 As Socket Private client_2 As Socket .......... client_1.Initialize("client_1") client_2.Initialize("client_2") .......... client_1.Connect(ip1, 6001, 5000) client_2.Connect(ip2, 6002, 5000) .......... Is this correct? Or do you recommend another solution? Upvote 0
Excuse me Erel antother question (a bit of confusion), I decided for ease to use the example of CCTV. As I said, the devices are server and the descktop application (b4j) is the client, in b4j i have to create n client for ever device and use different port? Code: Copy Private client_1 As Socket Private client_2 As Socket .......... client_1.Initialize("client_1") client_2.Initialize("client_2") .......... client_1.Connect(ip1, 6001, 5000) client_2.Connect(ip2, 6002, 5000) .......... Is this correct? Or do you recommend another solution?
Erel B4X founder Staff member Licensed User Longtime User Jun 25, 2015 #6 micro said: i have to create n client for ever device and use different port? Click to expand... No. See the example. Upvote 0
micro said: i have to create n client for ever device and use different port? Click to expand... No. See the example.
M micro Well-Known Member Licensed User Longtime User Jun 25, 2015 #7 Erel said: No. See the example. Click to expand... Ok.... It's possible send the same data to a group of ip without cycling the various ip? If more device trasmitting at the same time (It is easy to occur), I can lose some data? The stack TCP/IP as it is wide? I'm sorry but I have to study well the best mode Last edited: Jun 25, 2015 Upvote 0
Erel said: No. See the example. Click to expand... Ok.... It's possible send the same data to a group of ip without cycling the various ip? If more device trasmitting at the same time (It is easy to occur), I can lose some data? The stack TCP/IP as it is wide? I'm sorry but I have to study well the best mode
Erel B4X founder Staff member Licensed User Longtime User Jun 28, 2015 #8 micro said: It's possible send the same data to a group of ip without cycling the various ip? Click to expand... No. You need to send it to each socket separately. Upvote 0
micro said: It's possible send the same data to a group of ip without cycling the various ip? Click to expand... No. You need to send it to each socket separately.