mhoover
29th May 2009, 01:24
I want to architect a client and a server where the server sends out data periodically and is able to receive commands. Since the clients need to be able to send commands and receive data, both the client and the server have to have the ability to read and write.
I'm trying to find a good template to get started. It looks like the fortuneclient/fortune server example won't work because the server is not able to read anything from the client. It only detects new connections. Is that right?
I suppose I could use QUdpSocket on both the client and the server and just use the readDatagram/writeDatagram functions to implement reading and writing. If I go down this path, would I need to use different ports for the commands to the server and the responses from the server? Also, is there an example that uses this?
Sorry for asking such a broad question on this. Thanks in advance for whatever help may come.
I'm trying to find a good template to get started. It looks like the fortuneclient/fortune server example won't work because the server is not able to read anything from the client. It only detects new connections. Is that right?
I suppose I could use QUdpSocket on both the client and the server and just use the readDatagram/writeDatagram functions to implement reading and writing. If I go down this path, would I need to use different ports for the commands to the server and the responses from the server? Also, is there an example that uses this?
Sorry for asking such a broad question on this. Thanks in advance for whatever help may come.