I have looked at both the links sent.
Let me outline an overview of what I am attempting to accomplish:
I have a number of ADT (Articulated Dump Truck) vehicles (~1000) operating in open-cast mines.
All these vehicles have an Android 7" tablet that acts as a Interface with the operators.
These Android devices also obtain various parameters, using USB Serial, from sensors mounted within the vehicle.
I must maintain a permanent connection from the remote devices with my server (2008 R2) - this I have accomplished either using TCP Sockets and a "heartbeat" and also with WebSockets.
I must be able to receive data from the remote devices - This I have no problem with using either TCP Sockets or WebSockets.
I must be able to send a message from the server to all remote devices (broadcast) - This I have no problem with using either TCP Sockets or WebSockets.
I must be able to send a message to an individual remote device - This is where I have a problem.
The overall architecture:
As I have no experience with HTML or web pages, I have written a very simple "Console" web page that the user enters a message into.
I then write this message to a MySQL database.
The Server app (B4J), must then periodically query this database, and if a message is present, then the message is sent, either as a broadcast to all remote devices OR to an individual remote device. Once sent, the message is deleted from the database.
Looking at the above link "Chatroom", this could work, but I would not use the "index.html" nor the "chat.html".
I would like to use the remote device IMEI as the chat "name".
Could this IMEI (name) be sent on initial connection?