[Development] Distinguish clients connected to QtWebChannel

Lutz Schönemann lutz.schoenemann at basyskom.com
Fri Jul 4 15:44:30 CEST 2014


Hi,

inspecting the QtWebChannel code I found that a QMetaObjectPublisher 
object is not able to distinquish between different clients. In my eyes 
that is a critical part that is needed to support multiple clients 
connected to a single QWebChannel.
Because of that reason the feature that property updates are only send 
if the client is idling is not working correctly. Imagine two clients 
connected to a web channel get a bunch of property updates. The first 
client finished processing and sends a "idle-message" to signal that he 
is able to receive the next update. The second client is still 
processing the first bunch of property changes but will receive the next 
update regardless of whether it is able to process it or not. That could 
lead to clients that are out of sync.
Also a client can disconnect from a signal but because of not being able 
to distinguish the clients all clients will not receive that signal anymore.

Is it meant to be that way? In my opinion the channel should hold the 
state of every client instead of one state.

Regards,
Lutz




More information about the Development mailing list