C cbal03 Active Member Licensed User Longtime User May 22, 2016 #1 I'm curious if anyone else has created an app (in b4a) that allows 2 ppl to interact over the internet. I wrote an app that allows 2 ppl to play a game. Here's what I did. Both devices connect to an online database. Each device has his own record in a table. When device #1 performs an action, the action is written to device #2's online record. Device #2 polls it own online record and reads the action from Device #1 and vice versa. I've tried data streaming to replace 'polling' but there is always some glitch with the stream that causes unreasonable delays. The method I use is reliable but I'm curious if there a better or different way to achieve 2 device interation online?
I'm curious if anyone else has created an app (in b4a) that allows 2 ppl to interact over the internet. I wrote an app that allows 2 ppl to play a game. Here's what I did. Both devices connect to an online database. Each device has his own record in a table. When device #1 performs an action, the action is written to device #2's online record. Device #2 polls it own online record and reads the action from Device #1 and vice versa. I've tried data streaming to replace 'polling' but there is always some glitch with the stream that causes unreasonable delays. The method I use is reliable but I'm curious if there a better or different way to achieve 2 device interation online?
Erel B4X founder Staff member Licensed User Longtime User May 22, 2016 #2 You can use a B4J WebSocket server for this. Check the chat example: https://b4x.com:51041/chat/chat.html Custom push framework: Custom WebSocket Based Push Framework Web apps: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content Upvote 0
You can use a B4J WebSocket server for this. Check the chat example: https://b4x.com:51041/chat/chat.html Custom push framework: Custom WebSocket Based Push Framework Web apps: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content
C cbal03 Active Member Licensed User Longtime User May 23, 2016 #3 Erel said: You can use a B4J WebSocket server for this. Check the chat example: https://b4x.com:51041/chat/chat.html Custom push framework: Custom WebSocket Based Push Framework Web apps: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content Click to expand... Thanks Erel. Will check it out. Upvote 0
Erel said: You can use a B4J WebSocket server for this. Check the chat example: https://b4x.com:51041/chat/chat.html Custom push framework: Custom WebSocket Based Push Framework Web apps: https://www.b4x.com/android/forum/threads/webapp-web-apps-overview.39811/#content Click to expand... Thanks Erel. Will check it out.
C cbal03 Active Member Licensed User Longtime User May 23, 2016 #4 Looks promising. I'm going to try implementation. I'm hopeful that your websocket server could become the new foundation for our game server communications. Looks like I'll need to update my b4a to v3.8. Thanks Erel!! Upvote 0
Looks promising. I'm going to try implementation. I'm hopeful that your websocket server could become the new foundation for our game server communications. Looks like I'll need to update my b4a to v3.8. Thanks Erel!!
DonManfred Expert Licensed User Longtime User May 23, 2016 #5 cbal03 said: Looks like I'll need to update my b4a to v3.8. Click to expand... buy a new update and you then can update directly to 5.8 (3.8 is really old now) Upvote 0
cbal03 said: Looks like I'll need to update my b4a to v3.8. Click to expand... buy a new update and you then can update directly to 5.8 (3.8 is really old now)