I was looking and playing around with the various WebSocket examples for sending data and calling subroutines between a B4A client, and a B4J websocket server.
Thats awesome, but, here is the question:
What if I have multiple B4A clients connected to the B4J websocket server, How do I send messages to specific clients and not others??
I saw that example. But again its not clear to me how you can send messages to a specific websocket. Sure I can hold a websocket in a map, but then what?
I THINK I have it figured out. an ID is generated at the client and sent back over, and stored with the object. I keep forgetting to think 4th dimensionally, each person that connects over a websocket, creates a new temporary "copy" of PushB4A and its instance is stored in the map along with the unique ID and thats how it works.... as far as I can tell.
Next thing, is there a B4i client like the B4A client??
Edit: Found it. all I had to do was use the magical search field.
I would use a server side (DBMS) UserID, as index of the map, which should contain the websocket class instances; so, each instance "is a client/user" and all the data and routines relateted to that user can be write there.