Hi,
I found a problem using the invokeRemoteMethodBlocking and TCP connections (QJsonRpcTcpServer and client).
It seems that when two calls overlap (coming from two distinct clients), the IDs of the response are mixed:
On the client I see:
Call1, socket1 (send id 10) (a bit long call)
after some time....
Call2, socket2 (send id 11) (very fast call)
Response2, socket2 (receive id11)
Response1, socket1 (receive id11)
The response to call1 takes the id of the second call.
In the servers the logs show a similar situation, but responses seems sent in a different order:
Call1, socket1 (receive id 10) (a bit long call)
after some time....
Call2, socket2 (receive id 11) (very fast call)
Response1, socket1 (send id11)
Response2, socket2 (send id11)
Here a real logs:
On the client:
sending( QJsonRpcSocket(0x5e4520) ): "{"id":188,"jsonrpc":"2.0","method":"ICBox.startRequest","params":[1]}"
......
sending( QJsonRpcSocket(0x5f7158) ): "{"id":192,"jsonrpc":"2.0","method":"ICBox.keepAliveRequest"}"
received( QJsonRpcSocket(0x5f7158) ): "{"id":192,"jsonrpc":"2.0","result":1}"
received( QJsonRpcSocket(0x5e4520) ): "{"id":192,"jsonrpc":"2.0","result":1}"
Note that two different sockets are used, due to qtcpsocket limitation in a multithread environment.
On the server:
received( QJsonRpcSocket(0x504fb0) ): "{"id":188,"jsonrpc":"2.0","method":"ICBox.startRequest","params":[1]}"
received( QJsonRpcSocket(0x505030) ): "{"id":192,"jsonrpc":"2.0","method":ICBox.keepAliveRequest"}"
sending( QJsonRpcSocket(0x504fb0) ): "{"id":192,"jsonrpc":"2.0","result":1}"
sending( QJsonRpcSocket(0x505030) ): "{"id":192,"jsonrpc":"2.0","result":1}"
Did you have any idea?
best regards
Marco