cafu
22nd December 2009, 18:07
Hi everybody i have a small question i have several serial devices, each of then need to be check all the time, plus the possibility to set some stuff on then. I also have a server and several client connected using QtcpSocket and QtcpServer.
The clients are the one that see the information and set thing to serial devices.
I have a made a thread for each serial, and a thread that control the the server as well a thread for the client.
things seems to work properly but i am affraid that this is no a good solution.
The client should send a request to the server, the server say to the device that need to perfomed a command the answer is receive and the is transmited to the client,
in the meantime the client should not be able to send a new command but it can receive message from the server.
Beside Thread for wait and no block the guis(clients and server), what other option do i have.
The clients are the one that see the information and set thing to serial devices.
I have a made a thread for each serial, and a thread that control the the server as well a thread for the client.
things seems to work properly but i am affraid that this is no a good solution.
The client should send a request to the server, the server say to the device that need to perfomed a command the answer is receive and the is transmited to the client,
in the meantime the client should not be able to send a new command but it can receive message from the server.
Beside Thread for wait and no block the guis(clients and server), what other option do i have.